ADC3669API
1from samrat_api import Samrat 2from time import sleep 3from math import log 4from typing import List 5 6 7class ADC3669: 8 def __init__(self, device_name, device_handle, sample_frequency): 9 self.device_name = device_name 10 self.device = device_handle 11 self.fs = sample_frequency 12 self.samrat = Samrat(device_handle, sample_frequency) 13 14 def reg_read(self, addr: int) -> int: 15 """Reads the value stored in a register 16 17 Arguments: 18 addr: 19 The address of the desired register 20 21 Raises: 22 None 23 24 Returns: 25 The value of the register that is read back 26 """ 27 return self.samrat.read(addr) 28 29 def reg_write(self, addr: int, value: int) -> None: 30 """Writes a value into a register 31 32 Arguments: 33 addr: 34 The address of the desired register 35 value: 36 The value that is to be written to the register 37 38 Raises: 39 None 40 41 Returns: 42 None 43 """ 44 self.samrat.write(addr, value) 45 46 def configure_ready(self) -> int: 47 """Indicates the status of the internal fuse load after HW reset. The device should not be programmed before the fuse load is complete. 48 49 Arguments: 50 None 51 52 Raises: 53 None 54 55 Returns: 56 Status of the fuse autoload. 57 58 - 0: Fuse autoload is incomplete, and the device should not be programmed 59 - 1: Fuse autoload is complete, the device can be programmed 60 """ 61 return self.samrat.GET_FUSE_LOAD_DONE() 62 63 def reset(self) -> None: 64 """Resets the device. The register will self clear after reset. 65 66 Arguments: 67 None 68 69 Raises: 70 None 71 72 Returns: 73 None 74 """ 75 self.samrat.SET_SOFTWARE_RESET(1) 76 77 def global_powerdown(self, value: int) -> None: 78 """Powers down the device. 79 80 Arguments: 81 value: input value 82 - 0: Normal Operation 83 - 1: Powerdown 84 85 Raises: 86 None 87 88 Returns: 89 None 90 """ 91 self.samrat.SET_GLOBAL_PDN(value) 92 93 def fast_powerdown_cha(self, value: int) -> None: 94 """Puts channel A into a low power state that enables a fast wake time. 95 96 Arguments: 97 value: input value 98 - 0: Normal Operation 99 - 1: Powerdown 100 101 Raises: 102 None 103 104 Returns: 105 None 106 """ 107 self.samrat.SET_FAST_PDN_CH0(value) 108 109 def fast_powerdown_chb(self, state: int) -> None: 110 """Puts channel B into a low power state that enables a fast wake time. 111 112 Arguments: 113 value: input value 114 - 0: Normal Operation 115 - 1: Powerdown 116 117 Raises: 118 None 119 120 Returns: 121 None 122 """ 123 self.samrat.SET_FAST_PDN_CH1(state) 124 125 def sysref_detect_clear(self, value: int) -> None: 126 """resets the SYSREF DET flag 127 128 Arguments: 129 value: input value 130 - 0: Normal operation 131 - 1: SYSREF DET flag gets reset 132 133 Raises: 134 None 135 136 Returns: 137 None 138 """ 139 self.samrat.SET_SYSREF_DET_CLR(value) 140 141 def cha_termination(self, value: int) -> None: 142 """Sets the internal termination on channel A. 143 144 Arguments: 145 value: input value 146 - 0: 100Ω differential termination 147 - 1: 200Ω differential termination 148 149 Raises: 150 None 151 152 Returns: 153 None 154 """ 155 self.samrat.SET_CH0_200_OHM_TERM(value) 156 157 def chb_termination(self, value: int) -> None: 158 """Sets the internal termination on channel B. 159 160 Arguments: 161 value: input value 162 - 0: 100Ω differential termination 163 - 1: 200Ω differential termination 164 165 Raises: 166 None 167 168 Returns: 169 None 170 """ 171 self.samrat.SET_CH1_200_OHM_TERM(value) 172 173 def overrange_clear(self, value) -> None: 174 """A transition from 0 to 2 clears the clears the sticky overrange bit. 175 176 Arguments: 177 value: input value 178 - 0: Normal operation 179 - 2: Overrange bit is cleared 180 181 Raises: 182 None 183 184 Returns: 185 None 186 """ 187 self.samrat.SET_DIG_OVR_CLEAR(value) 188 189 def overrange_sticky(self, value: int) -> None: 190 """Makes the digital Overrange sticky. 191 192 Arguments: 193 value: input value 194 - 0: Digital OVR is non-sticky (updated based on overrange_length()) 195 - 1: Digital OVR is sticky (use overrange_clear() to reset) 196 197 Raises: 198 None 199 200 Returns: 201 None 202 """ 203 self.samrat.SET_DIG_OVR_MODE(value) 204 205 def overrange_length(self, value: int) -> None: 206 """Controls the Overrange pulse expansion. The expansion width is specified in terms of number of clock cycles. 207 208 Arguments: 209 value: input value 210 8-bit integer specifying the ovr pulse expansion in number of clock cycles 211 212 Raises: 213 None 214 215 Returns: 216 None 217 """ 218 self.samrat.SET_DIG_OVR_WIDTH(value) 219 220 def lvds_termination(self, value: int) -> None: 221 """Configures the LVDS termination resistance 222 223 Arguments: 224 value: input value 225 - 0: LVDS termination is 50Ω 226 - 1: LVDS termination is 100Ω 227 228 Raises: 229 None 230 231 Returns: 232 None 233 """ 234 self.samrat.SET_HUNDRED_OHM_TERM(value) 235 236 def lvds_half_swing(self, value: int) -> None: 237 """Reduces LVDS output swing by 50% to reduce power consumption 238 239 Arguments: 240 value: input value 241 - 0: Normal output swing 242 - 1: Reduced output swing 243 244 Raises: 245 None 246 247 Returns: 248 None 249 """ 250 self.samrat.SET_LVDS_HALF_SWING_EN(value) 251 252 def data_rate(self, value: int) -> None: 253 """This bit configures the parallel LVDS output interface. When only a single channel is output, SDR LVDS can be enabled. 254 255 Arguments: 256 value: input value 257 - 0: Dual Data Rate (DDR) 258 - 1: Single Data Rate (SDR) 259 260 Raises: 261 None 262 263 Returns: 264 None 265 """ 266 self.samrat.SET_SDR(value) 267 268 def swap_channels(self, value: int) -> None: 269 """Internally swaps channel A and channel B. 270 271 Arguments: 272 value: input value 273 - 0: Normal operation 274 - 1: Channel A and channel B are swapped 275 276 Raises: 277 None 278 279 Returns: 280 None 281 """ 282 self.samrat.SET_SWAP_CHANNELS(value) 283 284 def lvds_data_invert(self, value) -> None: 285 """Inverts the polarity of individual LVDS output lanes. 286 287 Arguments: 288 lanes: 289 Value to write to the register, where each bit represents as listed in the datasheet, and the values correspond to the following functions: 290 - 0: Normal operation 291 - 1: LVDS Lane is inverted 292 293 Raises: 294 None 295 296 Returns: 297 None 298 """ 299 self.samrat.SET_LVDS_DATA_INV(value) 300 301 def lvds_powerdown(self, value: List[int]) -> None: 302 """Powers down the individual LVDS output lanes and puts LVDS pins into high impedance state. 303 304 Arguments: 305 value: input value 306 Value to write to the register, where each bit represents as listed in the datasheet, and the values correspond to the following functions: 307 - 0: Normal operation 308 - 1: Powered down 309 310 Raises: 311 None 312 313 Returns: 314 None 315 """ 316 self.samrat.SET_LVDS_DATA_PDN(value) 317 318 def fclk_duty_cycle(self, value: int) -> None: 319 """Adjusts the Frame clock duty cycle. 320 Arguments: 321 value: input value 322 - 0: FCLK stays high for one DCLK cycle at the beginning of the output sample 323 - 1: FCLK stays high for 50% of the output sample 324 325 Raises: 326 None 327 328 Returns: 329 None 330 """ 331 self.samrat.SET_ENABLE_50PER_DUTY_FCLK(value) 332 333 def fclk_disable(self, value: int) -> None: 334 """Disables the output Frame clock. 335 336 Arguments: 337 value: input value 338 - 0: FCLK replaces the LSB data and is transmitted on DOUT0 339 - 1: FCLK is disabled and the LSB data is transmitted on DOUT0. 340 341 Raises: 342 None 343 344 Returns: 345 None 346 """ 347 self.samrat.SET_DISABLE_FRAME_INSERTION(value) 348 349 def lvds_mux_enable(self, value: int) -> None: 350 """Enables use of the LVDS output mux 351 352 Arguments: 353 value: input value 354 - 0: LVDS Mux disabled 355 - 1: LVDS Mux enabled 356 357 Raises: 358 None 359 360 Returns: 361 None 362 """ 363 self.samrat.SET_LVDS_CROSS_BAR_MUX_EN(value) 364 365 def lvds_swap_edge(self, value: int) -> None: 366 """Swaps the output data bits transmitted on rising and falling edge of DCLK. 367 368 Arguments: 369 value: input value 370 - 0: Normal operation 371 - 1: Output bits on rising and falling edge are swapped. 372 373 Raises: 374 None 375 376 Returns: 377 None 378 """ 379 self.samrat.SET_LVDS_SWAP_RISE_FALL(value) 380 381 def lvds_scrambling(self, value: int) -> None: 382 """Controls the scrambling and LSB insertion configuration on the output data 383 384 Arguments: 385 value: input value 386 - 0: No scrambling, Defualt Operation 387 - 1: Data is XOR'ed with a PRBS bit. This PRBS is inserted on the LSB position 388 - 2: OVR is inserted on the LSB position 389 - 3: OVR is inserted on the LSB+1 position 390 - 4: Data is XOR'ed with a PRBS bit, and the PRBS is inserted on LSB+1 position 391 - 5: OVR is inserted on LSB+1 position, PRBS is inseted on LSB position. Data is XOR'ed with PRBS 392 - 6: OVR is inserted on LSB+2 position, PRBS is inseted on LSB+1 position. Data is XOR'ed with PRBS 393 394 Raises: 395 None 396 397 Returns: 398 None 399 """ 400 self.samrat.SET_LVDS_DATA_DITH_MODE(value) 401 402 def dout0_mux(self, data: int) -> None: 403 """Configures the digital data output on LVDS lane 0 404 405 Arguments: 406 data: 407 The internal digital data bus lane that is being mapped 408 409 Raises: 410 None 411 412 Returns: 413 None 414 """ 415 self.samrat.SET_LANE0_MUX_SEL(data) 416 417 def dout1_mux(self, data: int) -> None: 418 """Configures the digital data output on LVDS lane 1 419 420 Arguments: 421 data: 422 The internal digital data bus lane that is being mapped 423 424 Raises: 425 None 426 427 Returns: 428 None 429 """ 430 self.samrat.SET_LANE1_MUX_SEL(data) 431 432 def dout2_mux(self, data: int) -> None: 433 """Configures the digital data output on LVDS lane 2 434 435 Arguments: 436 data: 437 The internal digital data bus lane that is being mapped 438 439 Raises: 440 None 441 442 Returns: 443 None 444 """ 445 self.samrat.SET_LANE2_MUX_SEL(data) 446 447 def dout3_mux(self, data: int) -> None: 448 """Configures the digital data output on LVDS lane 3 449 450 Arguments: 451 data: 452 The internal digital data bus lane that is being mapped 453 454 Raises: 455 None 456 457 Returns: 458 None 459 """ 460 self.samrat.SET_LANE3_MUX_SEL(data) 461 462 def dout4_mux(self, data: int) -> None: 463 """Configures the digital data output on LVDS lane 4 464 465 Arguments: 466 data: 467 The internal digital data bus lane that is being mapped 468 469 Raises: 470 None 471 472 Returns: 473 None 474 """ 475 self.samrat.SET_LANE4_MUX_SEL(data) 476 477 def dout5_mux(self, data: int) -> None: 478 """Configures the digital data output on LVDS lane 5 479 480 Arguments: 481 data: 482 The internal digital data bus lane that is being mapped 483 484 Raises: 485 None 486 487 Returns: 488 None 489 """ 490 self.samrat.SET_LANE5_MUX_SEL(data) 491 492 def dout6_mux(self, data: int) -> None: 493 """Configures the digital data output on LVDS lane 6 494 495 Arguments: 496 data: 497 The internal digital data bus lane that is being mapped 498 499 Raises: 500 None 501 502 Returns: 503 None 504 """ 505 self.samrat.SET_LANE6_MUX_SEL(data) 506 507 def dout7_mux(self, data: int) -> None: 508 """Configures the digital data output on LVDS lane 7 509 510 Arguments: 511 data: 512 The internal digital data bus lane that is being mapped 513 514 Raises: 515 None 516 517 Returns: 518 None 519 """ 520 self.samrat.SET_LANE7_MUX_SEL(data) 521 522 def dout8_mux(self, data: int) -> None: 523 """Configures the digital data output on LVDS lane 8 524 525 Arguments: 526 data: 527 The internal digital data bus lane that is being mapped 528 529 Raises: 530 None 531 532 Returns: 533 None 534 """ 535 self.samrat.SET_LANE8_MUX_SEL(data) 536 537 def dout9_mux(self, data: int) -> None: 538 """Configures the digital data output on LVDS lane 9 539 540 Arguments: 541 data: 542 The internal digital data bus lane that is being mapped 543 544 Raises: 545 None 546 547 Returns: 548 None 549 """ 550 self.samrat.SET_LANE9_MUX_SEL(data) 551 552 def dout10_mux(self, data: int) -> None: 553 """Configures the digital data output on LVDS lane 10 554 555 Arguments: 556 data: 557 The internal digital data bus lane that is being mapped 558 559 Raises: 560 None 561 562 Returns: 563 None 564 """ 565 self.samrat.SET_LANE10_MUX_SEL(data) 566 567 def dout11_mux(self, data: int) -> None: 568 """Configures the digital data output on LVDS lane 11 569 570 Arguments: 571 data: 572 The internal digital data bus lane that is being mapped 573 574 Raises: 575 None 576 577 Returns: 578 None 579 """ 580 self.samrat.SET_LANE11_MUX_SEL(data) 581 582 def dout12_mux(self, data: int) -> None: 583 """Configures the digital data output on LVDS lane 12 584 585 Arguments: 586 data: 587 The internal digital data bus lane that is being mapped 588 589 Raises: 590 None 591 592 Returns: 593 None 594 """ 595 self.samrat.SET_LANE12_MUX_SEL(data) 596 597 def dout13_mux(self, data: int) -> None: 598 """Configures the digital data output on LVDS lane 13 599 600 Arguments: 601 data: 602 The internal digital data bus lane that is being mapped 603 604 Raises: 605 None 606 607 Returns: 608 None 609 """ 610 self.samrat.SET_LANE13_MUX_SEL(data) 611 612 def dout14_mux(self, data: int) -> None: 613 """Configures the digital data output on LVDS lane 14 614 615 Arguments: 616 data: 617 The internal digital data bus lane that is being mapped 618 619 Raises: 620 None 621 622 Returns: 623 None 624 """ 625 self.samrat.SET_LANE14_MUX_SEL(data) 626 627 def dout15_mux(self, data: int) -> None: 628 """Configures the digital data output on LVDS lane 15 629 630 Arguments: 631 data: 632 The internal digital data bus lane that is being mapped 633 634 Raises: 635 None 636 637 Returns: 638 None 639 """ 640 self.samrat.SET_LANE15_MUX_SEL(data) 641 642 def high_fin(self, value: int) -> None: 643 """Enable for best AC performance for input frequencies greater than 500 MHz 644 645 Arguments: 646 value: input value 647 - 0: Normal operation 648 - 1: Performance optimized for input frequencies greater than 500 MHz 649 650 Raises: 651 None 652 653 Returns: 654 None 655 """ 656 self.samrat.SET_DIS_ANA_NL_CORR(value) 657 658 def sysref_detect(self) -> int: 659 """Indicates if a SYSREF signal is detected. Upon detection this bit stays high until it gets reset (0x102, D6) or a device reset is issued. 660 661 Arguments: 662 None 663 664 Raises: 665 None 666 667 Returns: 668 Status of the Sysref signal 669 670 - 0: No Sysref signal detected 671 - 1: Sysref signal detected 672 """ 673 return self.samrat.GET_SYSREF_DET() 674 675 def sysref_or(self) -> int: 676 """Output of the five SYSREF XOR flags logically OR'ed together 677 678 Arguments: 679 None 680 681 Raises: 682 None 683 684 Returns: 685 Status of the SYSREF flags OR'ed together 686 687 - 0: No sysref flags raised 688 - 1: One of the five XOR flags is raised 689 """ 690 return self.samrat.GET_SYSREF_OR() 691 692 def sysref_xor(self) -> int: 693 """XOR flags from the SYSREF window monitoring circuitry. 694 695 The sampling clock falling edge is used to capture the SYSREF signal. 696 If a SYSREF signal transition happens within -60/+140 ps of the SYSREF capture, the appropriate XOR flag gets raised. 697 These bits are updated on every SYSREF rising edge. 698 699 Arguments: 700 None 701 702 Raises: 703 None 704 705 Returns: 706 List of 5 flags as follows 707 708 - X0: SYSREF leading sample clock by 20 to 60ps 709 - X1: SYSREF leading sample clock by 20ps to 0ps or SYSREF lagging sample clock by 0 to 20ps 710 - X2: SYSREF lagging sample clock by up to 20 to 60ps 711 - X3: SYSREF lagging sample clock by 60 to 100ps 712 - X4: SYSREF lagging sample clock by 100 to 140ps 713 714 With the corresponding values: 715 - 0: Flag not raised 716 - 1: Flag raised 717 """ 718 return self.samrat.GET_SYSREF_XOR() 719 720 def gpio_config(self, value: int) -> None: 721 """Configures the functionaliy of the two GPIO pins 722 723 Arguments: 724 value: input value 725 726 | Value | GPIO 1 | GPIO 0 | 727 |:------:|:-------------------:|:-------------------:| 728 | 0 | NOT USED | SYSREF | 729 | 3 | GLOBAL POWER DOWN | SYSREF | 730 | 4 | EXTERNAL REFERENCE | SYSREF | 731 | 5 | NCO SWITCH 1 | NCO SWITCH 0 | 732 | 8 | NOT USED | SYSREF | 733 | 9 | OVR CHB/CHA | SYSREF | 734 | 10 | NOT USED | GLOBAL POWER DOWN | 735 | 11 | OVR CHB/CHA | GLOBAL POWER DOWN | 736 | 12 | OVR CHB | OVR CHA | 737 738 Raises: 739 None 740 741 Returns: 742 None 743 """ 744 self.samrat.SET_GPIO_CONFIG(value) 745 746 def pattern_clk(self, value: int) -> None: 747 """Controls the clock of the pattern signal generator. 748 749 Arguments: 750 value: input value 751 - 0: Normal operation 752 - 1: Decimation CLK is used for the pattern generator 753 754 Raises: 755 None 756 757 Returns: 758 None 759 """ 760 self.samrat.SET_PATTERN_CLK(value) 761 762 def test_pattern(self, value: int) -> None: 763 """Controls the type of test pattern. 764 765 The generated pattern is 20 bits wide. In 16 bit resolution mode, 16 MSBs of the pattern mode are sent out. 766 In 32 bit resolution mode, 12 zeros are padded to the generated pattern and sent out. 767 768 Arguments: 769 value: input value 770 - 0: Test pattern is disabled 771 - 1: Ramp pattern with a step of 1 (at 20 bit level, which is equivalent to 1/16 at 16 bit level) 772 - 2: Ramp pattern with a step value set by CUSTOM PATTERN. 773 - 3: Not used 774 - 4: Static pattern set by CUSTOM PATTERN 775 - 5: Pattern toggles between CUSTOM PATTERN and invert of CUSTOM PATTERN 776 - 6: Pattern toggles between CUSTOM PATTERN and 0 777 778 Raises: 779 None 780 781 Returns: 782 None 783 """ 784 self.samrat.SET_TEST_PATTERN_MODE(value) 785 786 def custom_pattern(self, value: int) -> None: 787 """Controls the pattern generator. This controls different functions depending on the TEST PATTERN setting 788 789 Arguments: 790 value: 791 20-bit custom pattern data 792 793 Raises: 794 None 795 796 Returns: 797 None 798 """ 799 # if value != 0: 800 # if not ((int(log(value, 2)) + 1) <= 20): 801 # raise Exception("Custom pattern value must be 20 bits long or less") 802 self.samrat.SET_CUSTOM_PATTERN(value) 803 804 def digital_gain_cha(self, value: int) -> None: 805 """Controls digital gain for channel A. Maximum gain is 6dB. 806 807 Arguments: 808 value: 809 Desired value to write into the register, where: 810 Gain = (20 x log(1+(Value / 128))) 811 812 Raises: 813 None 814 815 Returns: 816 None 817 """ 818 self.samrat.SET_CH0_PROG_GAIN(value) 819 820 def digital_gain_chb(self, value: int) -> None: 821 """Controls digital gain for channel B. Maximum gain is 6dB. 822 823 Arguments: 824 value: 825 Desired value to write into the register, where: 826 Gain = (20 x log(1+(Value / 128))) 827 828 Raises: 829 None 830 831 Returns: 832 None 833 """ 834 self.samrat.SET_CH1_PROG_GAIN(value) 835 836 def sysref_mode(self, value: int) -> None: 837 """Controls the global SYSREF mask 838 839 Arguments: 840 value: input value 841 - 0: Pass all SYSREF pulses 842 - 1: Pass the first SYSREF pulse and gates subsequent pulses 843 - 2: Gate all SYSREF pulses 844 - 3: Issue new SYSREF pulse. The pulse is issued when the state transitions to 11 845 846 Raises: 847 None 848 849 Returns: 850 None 851 """ 852 self.samrat.SET_SYSREF_MODE(value) 853 854 def lvds_sysref_mask(self, value: int) -> None: 855 """Controls the SYSREF pulse going to the LVDS block. 856 857 Arguments: 858 value: input value 859 - 0: Pass all SYSREF pulses 860 - 1: Pass the first SYSREF pulse and gates subsequent pulses 861 - 2: Gate all SYSREF pulses 862 - 3: Issue new SYSREF pulse. The pulse is issued when the state transitions to 11 863 864 Raises: 865 None 866 867 Returns: 868 None 869 """ 870 self.samrat.SET_LVDS_SYSREF_MASK(value) 871 872 def ddc_sysref_mask(self, value: int) -> None: 873 """Controls the SYSREF pulse of DDC block. 874 875 Arguments: 876 value: input value 877 - 0: Pass all SYSREF pulses 878 - 1: Pass the first SYSREF pulse and gates subsequent pulses 879 - 2: Gate all SYSREF pulses 880 - 3: Issue new SYSREF pulse. The pulse is issued when the state transitions to 11 881 882 Raises: 883 None 884 885 Returns: 886 None 887 """ 888 self.samrat.SET_DECIMATION_SYSREF_MASK(value) 889 890 def nco_sysref_mask(self, value: int) -> None: 891 """Controls the SYSREF pulse of NCO block. 892 893 Arguments: 894 value: input value 895 - 0: Pass all SYSREF pulses 896 - 1: Pass the first SYSREF pulse and gates subsequent pulses 897 - 2: Gate all SYSREF pulses 898 - 3: Issue new SYSREF pulse. The pulse is issued when the state transitions to 11 899 900 Raises: 901 None 902 903 Returns: 904 None 905 """ 906 self.samrat.SET_NCO_SYSREF_MASK(value) 907 908 def timer_sysref_mask(self, value: int) -> None: 909 """Controls the SYSREF pulse of TIMER block. 910 911 Arguments: 912 value: input value 913 - 0: Pass all SYSREF pulses 914 - 1: Pass the first SYSREF pulse and gates subsequent pulses 915 - 2: Gate all SYSREF pulses 916 - 3: Issue new SYSREF pulse. The pulse is issued when the state transitions to 11 917 918 Raises: 919 None 920 921 Returns: 922 None 923 """ 924 self.samrat.SET_TIMER_SYSREF_MASK(value) 925 926 def sysref_time_stamp(self, value: int) -> None: 927 """Allows the SYSREF to be passed on the FRAME_INDICATOR lane. OVR_ON_LSB setting takes precedence 928 929 Arguments: 930 value: input value 931 - 0: Normal operation 932 - 3: Pass sysref time stamp on the frame indicator lane 933 934 Raises: 935 None 936 937 Returns: 938 None 939 """ 940 self.samrat.SET_SYSREF_TIME_STAMP(value) 941 942 def gain_override(self, value: int) -> None: 943 """Controls 6dB gain setting of the DDC. The 6dB gain is applied in COMPLEX DDC mode by default. This will force 6 dB gain on the DDC output, irrespective of the DDC mode 944 945 Arguments: 946 value: input value 947 - 0: Normal operation 948 - 2: Unity gain 949 - 3: 6dB gain override 950 951 Raises: 952 None 953 954 Returns: 955 None 956 """ 957 self.samrat.SET_SIX_DB_GAIN_OVERRIDE(value) 958 959 def complex_decimation(self, value: int) -> None: 960 """Enables/disables complex decimation for all DDCs. 961 962 Arguments: 963 value: input value 964 - 0: Real Deciamtion 965 - 1: Complex Decimation 966 967 Raises: 968 None 969 970 Returns: 971 None 972 """ 973 self.samrat.SET_EN_COMPLEX_DDC(value) 974 975 def output_resolution(self, value: int) -> None: 976 """Configures the output resolution for 16-bit or 32-bit 977 978 Arguments: 979 value: input value 980 - 0: 16-bit output resolution 981 - 1: 32-bit output resolution 982 983 Raises: 984 None 985 986 Returns: 987 None 988 """ 989 self.samrat.SET_OUTPUT_RESOLUTION(value) 990 991 def output_format(self, value: int) -> None: 992 """Configures the output data format 993 994 Arguments: 995 value: input value 996 - 0: Output format is 2s complement 997 - 1: Output format is offset binary 998 999 Raises: 1000 None 1001 1002 Returns: 1003 None 1004 """ 1005 self.samrat.SET_OUTPUT_FORMAT(value) 1006 1007 def ddc0_mux(self, input: int) -> None: 1008 """Sets the input data source to decimation filter 0. 1009 1010 Arguments: 1011 ddc: 1012 The DDC for which the input data source is being configured 1013 input: 1014 Input to the DDC 1015 - 0: Channel A 1016 - 1: Channel B 1017 - 2: 2x Average ((ChA + ChB)/2) 1018 - 3: 2x Average ((ChA - ChB)/2) 1019 1020 Raises: 1021 None 1022 1023 Returns: 1024 None 1025 """ 1026 self.samrat.SET_DDC0_MUX(input) 1027 1028 def ddc1_mux(self, input: int) -> None: 1029 """Sets the input data source to decimation filter 1. 1030 1031 Arguments: 1032 ddc: 1033 The DDC for which the input data source is being configured 1034 input: 1035 Input to the DDC 1036 - 0: Channel B 1037 - 1: Channel A 1038 - 2: 2x Average ((ChA + ChB)/2) 1039 - 3: 2x Average ((ChA - ChB)/2) 1040 1041 Raises: 1042 None 1043 1044 Returns: 1045 None 1046 """ 1047 self.samrat.SET_DDC1_MUX(input) 1048 1049 def ddc2_mux(self, input: int) -> None: 1050 """Sets the input data source to decimation filter 2. 1051 1052 Arguments: 1053 ddc: 1054 The DDC for which the input data source is being configured 1055 input: 1056 Input to the DDC 1057 - 0: Channel A 1058 - 1: Channel B 1059 - 2: 2x Average ((ChA + ChB)/2) 1060 - 3: 2x Average ((ChA - ChB)/2) 1061 1062 Raises: 1063 None 1064 1065 Returns: 1066 None 1067 """ 1068 self.samrat.SET_DDC2_MUX(input) 1069 1070 def ddc3_mux(self, input: int) -> None: 1071 """Sets the input data source to decimation filter 3. 1072 1073 Arguments: 1074 ddc: 1075 The DDC for which the input data source is being configured 1076 input: 1077 Input to the DDC 1078 - 0: Channel B 1079 - 1: Channel A 1080 - 2: 2x Average ((ChA + ChB)/2) 1081 - 3: 2x Average ((ChA - ChB)/2) 1082 1083 Raises: 1084 None 1085 1086 Returns: 1087 None 1088 """ 1089 self.samrat.SET_DDC3_MUX(input) 1090 1091 def nco0_update(self, value: int) -> None: 1092 """Updates the four NCO frequencies of NCO0. 1093 1094 Arguments: 1095 value: input value 1096 - 0: Normal operation 1097 - 1: Update NCO0 frequencies 1098 1099 Raises: 1100 None 1101 1102 Returns: 1103 None 1104 """ 1105 self.samrat.SET_NCO0_UPDATE(value) 1106 1107 def nco1_update(self, value: int) -> None: 1108 """Updates the four NCO frequencies of NCO1. 1109 1110 Arguments: 1111 value: input value 1112 - 0: Normal operation 1113 - 1: Update NCO1 frequencies 1114 1115 Raises: 1116 None 1117 1118 Returns: 1119 None 1120 """ 1121 self.samrat.SET_NCO1_UPDATE(value) 1122 1123 def nco2_update(self, value: int) -> None: 1124 """Updates the four NCO frequencies of NCO2. 1125 1126 Arguments: 1127 value: input value 1128 - 0: Normal operation 1129 - 1: Update NCO2 frequencies 1130 1131 Raises: 1132 None 1133 1134 Returns: 1135 None 1136 """ 1137 self.samrat.SET_NCO2_UPDATE(value) 1138 1139 def nco3_update(self, value: int) -> None: 1140 """Updates the four NCO frequencies of NCO3. 1141 1142 Arguments: 1143 value: input value 1144 - 0: Normal operation 1145 - 1: Update NCO3 frequencies 1146 1147 Raises: 1148 None 1149 1150 Returns: 1151 None 1152 """ 1153 self.samrat.SET_NCO3_UPDATE(value) 1154 1155 def select_negative_image(self, value: int) -> None: 1156 """Controls the selection of the negative frequency image. Applicable only in Complex DDC mode. 1157 1158 Arguments: 1159 value: input value 1160 - 0: Normal operation 1161 - 1: Negative image 1162 1163 Raises: 1164 None 1165 1166 Returns: 1167 None 1168 """ 1169 self.samrat.SET_NCO_SEL_NEG_IMAGE(value) 1170 1171 def nco_mode(self, value: int) -> None: 1172 """Configures the NCOs operating mode. 1173 1174 Arguments: 1175 value: input value 1176 - 0: Phase continuous 1177 - 1: Infinite phase coherent 1178 1179 Raises: 1180 None 1181 1182 Returns: 1183 None 1184 """ 1185 self.samrat.SET_NCO_MODE(value) 1186 1187 def low_latency_enable(self, value: int) -> None: 1188 """Enables low latency mode by byapssing all digital features 1189 1190 Arguments: 1191 value: input value 1192 - 0: Normal Operation 1193 - 1: Low Latency Mode 1194 1195 Raises: 1196 None 1197 1198 Returns: 1199 None 1200 """ 1201 self.samrat.SET_ENABLE_LOW_LATENCY(value) 1202 1203 def disable_nco_auto_update(self, value: int) -> None: 1204 """Disables the automatic update when switching the NCOs using GPIO pins 1205 1206 Arguments: 1207 value: input value 1208 - 0: Automatic update enabled 1209 - 1: Automatic update disabled 1210 1211 Raises: 1212 None 1213 1214 Returns: 1215 None 1216 """ 1217 self.samrat.SET_DISABLE_NCO_AUTO_UPDATE(value) 1218 1219 def nco_select_enable(self, value: int) -> None: 1220 """This bit enables NCO frequency selection via SPI register 0x166 instead of GPIO pins. 1221 1222 Arguments: 1223 value: input value 1224 - 0: NCO Select via GPIO Pins 1225 - 1: NCO Select via SPI Write 1226 1227 Raises: 1228 None 1229 1230 Returns: 1231 None 1232 """ 1233 self.samrat.SET_ENABLE_NCO_SEL(value) 1234 1235 def nco_common_update(self, value: int) -> None: 1236 """Updates the four NCO frequencies of all NCOs. 1237 1238 Arguments: 1239 value: input value 1240 - 0: Normal operation 1241 - 1: Update NCO frequencies 1242 1243 Raises: 1244 None 1245 1246 Returns: 1247 None 1248 """ 1249 self.samrat.SET_NCO_COMMON_UPDATE(value) 1250 1251 def ddc0_nco_select(self, nco: int) -> None: 1252 """Selects which of the 4 frequencies is active for DDC0. 1253 1254 Arguments: 1255 nco: 1256 NCO word to set as the active frequency 1257 1258 Raises: 1259 None 1260 1261 Returns: 1262 None 1263 """ 1264 self.samrat.SET_DDC0_NCO_SEL(nco) 1265 1266 def ddc1_nco_select(self, nco: int) -> None: 1267 """Selects which of the 4 frequencies is active for DDC1. 1268 1269 Arguments: 1270 nco: 1271 NCO word to set as the active frequency 1272 1273 Raises: 1274 None 1275 1276 Returns: 1277 None 1278 """ 1279 self.samrat.SET_DDC1_NCO_SEL(nco) 1280 1281 def ddc2_nco_select(self, nco: int) -> None: 1282 """Selects which of the 4 frequencies is active for DDC2. 1283 1284 Arguments: 1285 nco: 1286 NCO word to set as the active frequency 1287 1288 Raises: 1289 None 1290 1291 Returns: 1292 None 1293 """ 1294 self.samrat.SET_DDC2_NCO_SEL(nco) 1295 1296 def ddc3_nco_select(self, nco: int) -> None: 1297 """Selects which of the 4 frequencies is active for DDC3. 1298 1299 Arguments: 1300 nco: 1301 NCO word to set as the active frequency 1302 1303 Raises: 1304 None 1305 1306 Returns: 1307 None 1308 """ 1309 self.samrat.SET_DDC3_NCO_SEL(nco) 1310 1311 def ddc0_decimation(self, value: int) -> None: 1312 """Sets the decimation filter factors for DDC0 when using unequal decimation factors. 1313 1314 Arguments: 1315 value: 1316 value to write to the register such that Decimation Factor = 2^value. 1317 1318 Raises: 1319 None 1320 1321 Returns: 1322 None 1323 """ 1324 self.samrat.SET_DDC0_DECIMATION_MODE(value) 1325 1326 def ddc1_decimation(self, value: int) -> None: 1327 """Sets the decimation filter factors for DDC1 when using unequal decimation factors. 1328 1329 Arguments: 1330 value: 1331 value to write to the register such that Decimation Factor = 2^value. 1332 1333 Raises: 1334 None 1335 1336 Returns: 1337 None 1338 """ 1339 self.samrat.SET_DDC1_DECIMATION_MODE(value) 1340 1341 def ddc2_decimation(self, value: int) -> None: 1342 """Sets the decimation filter factors for DDC2 when using unequal decimation factors. 1343 1344 Arguments: 1345 value: 1346 value to write to the register such that Decimation Factor = 2^value. 1347 1348 Raises: 1349 None 1350 1351 Returns: 1352 None 1353 """ 1354 self.samrat.SET_DDC2_DECIMATION_MODE(value) 1355 1356 def ddc3_decimation(self, value: int) -> None: 1357 """Sets the decimation filter factors for DDC3 when using unequal decimation factors. 1358 1359 Arguments: 1360 value: 1361 value to write to the register such that Decimation Factor = 2^value. 1362 1363 Raises: 1364 None 1365 1366 Returns: 1367 None 1368 """ 1369 self.samrat.SET_DDC3_DECIMATION_MODE(value) 1370 1371 def unequal_decimation(self, value: int) -> None: 1372 """Enables configuration of DDC0 thru DDC3 to have unequal decimation factors. 1373 1374 Arguments: 1375 value: input value 1376 - 0: Normal operation 1377 - 1: Unequal decimation factors enabled 1378 1379 Raises: 1380 None: 1381 1382 Returns: 1383 None 1384 """ 1385 self.samrat.SET_SELECT_INDEPENDENT_DECIMATION(value) 1386 1387 def number_of_ddcs(self, value: int) -> None: 1388 """This register configures the # of active DDCs. 1389 1390 Arguments: 1391 value: input value 1392 - 0: Single DDC per channel (Total two DDCs are enabled) 1393 - 1: Dual DDCs per channel (Total 4 DDCs are enabled) 1394 - 2: Just one DDC is enabled (1 DDC is active) 1395 - 3: Dual DDC for a single channel (Total two DDCs are enabled) 1396 1397 Raises: 1398 None 1399 1400 Returns: 1401 None 1402 """ 1403 lsb = value & 1 1404 msb = value >> 1 1405 self.samrat.SET_EN_DUAL_BAND(lsb) 1406 self.samrat.SET_DIS_DUAL_CHANNEL(msb) 1407 1408 def common_decimation(self, value: int) -> None: 1409 """Sets the decimation filter factor for all active DDCs. 1410 1411 Arguments: 1412 value: 1413 value to write to the register such that Decimation Factor = 2^value. 1414 1415 Raises: 1416 None 1417 1418 Returns: 1419 None 1420 """ 1421 self.samrat.SET_COMMON_DECIMATION_MODE(value) 1422 1423 def update_nyqusit_zone(self, value: int) -> None: 1424 """Must be pulsed after the Nyquist zone if programmed. 1425 1426 A 0 to 1 transition on this bit copies the NYQUIST ZONE field to an internal register. 1427 1428 Argument: 1429 value: input value 1430 - 0: Normal Operation 1431 - 1: Nyquist zone value is updated 1432 1433 Raises: 1434 None 1435 1436 Returns: 1437 None 1438 """ 1439 self.samrat.SET_UPDATE_NYQUIST(value) 1440 1441 def nyquist_zone(self, value: int) -> None: 1442 """Sets the nyquist zone of operation. 1443 1444 The internal calibration of the device depends on the NYQUIST ZONE of the signal being sampled. 1445 This field must be programmed based on the operating Nyquist zone. 1446 1447 Arguments: 1448 value: 1449 Operating nyquist zone (0 - 7) 1450 1451 Raises: 1452 None 1453 1454 Returns: 1455 None 1456 """ 1457 self.samrat.SET_NYQUIST_ZONE(value) 1458 1459 def ddc0_nco_frequency0(self, value: int) -> None: 1460 """Configures the 48-bit NCO frequency word 0 of DDC0. 1461 1462 Arguments: 1463 value: 1464 Value to write to the NCO frequency word, such that:\n 1465 When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS\n 1466 When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS 1467 1468 Raises: 1469 None 1470 1471 Returns: 1472 None 1473 """ 1474 self.samrat.SET_DDC0_NCO_FREQ0(value) 1475 1476 def ddc0_nco_frequency1(self, value: int) -> None: 1477 """Configures the 48-bit NCO frequency word 1 of DDC0. 1478 1479 Arguments: 1480 value: 1481 Value to write to the NCO frequency word, such that:\n 1482 When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS\n 1483 When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS 1484 1485 Raises: 1486 None 1487 1488 Returns: 1489 None 1490 """ 1491 self.samrat.SET_DDC0_NCO_FREQ1(value) 1492 1493 def ddc0_nco_frequency2(self, value: int) -> None: 1494 """Configures the 48-bit NCO frequency word 2 of DDC0. 1495 1496 Arguments: 1497 value: 1498 Value to write to the NCO frequency word, such that:\n 1499 When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS\n 1500 When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS 1501 1502 Raises: 1503 None 1504 1505 Returns: 1506 None 1507 """ 1508 self.samrat.SET_DDC0_NCO_FREQ2(value) 1509 1510 def ddc0_nco_frequency3(self, value: int) -> None: 1511 """Configures the 48-bit NCO frequency word 3 of DDC0. 1512 1513 Arguments: 1514 value: 1515 Value to write to the NCO frequency word, such that:\n 1516 When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS\n 1517 When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS 1518 1519 Raises: 1520 None 1521 1522 Returns: 1523 None 1524 """ 1525 self.samrat.SET_DDC0_NCO_FREQ3(value) 1526 1527 def ddc1_nco_frequency0(self, value: int) -> None: 1528 """Configures the 48-bit NCO frequency word 0 of DDC1. 1529 1530 Arguments: 1531 value: 1532 Value to write to the NCO frequency word, such that:\n 1533 When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS\n 1534 When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS 1535 1536 Raises: 1537 None 1538 1539 Returns: 1540 None 1541 """ 1542 self.samrat.SET_DDC1_NCO_FREQ0(value) 1543 1544 def ddc1_nco_frequency1(self, value: int) -> None: 1545 """Configures the 48-bit NCO frequency word 1 of DDC1. 1546 1547 Arguments: 1548 value: 1549 Value to write to the NCO frequency word, such that:\n 1550 When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS\n 1551 When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS 1552 1553 Raises: 1554 None 1555 1556 Returns: 1557 None 1558 """ 1559 self.samrat.SET_DDC1_NCO_FREQ1(value) 1560 1561 def ddc1_nco_frequency2(self, value: int) -> None: 1562 """Configures the 48-bit NCO frequency word 2 of DDC1. 1563 1564 Arguments: 1565 value: 1566 Value to write to the NCO frequency word, such that:\n 1567 When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS\n 1568 When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS 1569 1570 Raises: 1571 None 1572 1573 Returns: 1574 None 1575 """ 1576 self.samrat.SET_DDC1_NCO_FREQ2(value) 1577 1578 def ddc1_nco_frequency3(self, value: int) -> None: 1579 """Configures the 48-bit NCO frequency word 3 of DDC1. 1580 1581 Arguments: 1582 value: 1583 Value to write to the NCO frequency word, such that:\n 1584 When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS\n 1585 When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS 1586 1587 Raises: 1588 None 1589 1590 Returns: 1591 None 1592 """ 1593 self.samrat.SET_DDC1_NCO_FREQ3(value) 1594 1595 def ddc2_nco_frequency0(self, value: int) -> None: 1596 """Configures the 48-bit NCO frequency word 0 of DDC2. 1597 1598 Arguments: 1599 value: 1600 Value to write to the NCO frequency word, such that:\n 1601 When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS\n 1602 When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS 1603 1604 Raises: 1605 None 1606 1607 Returns: 1608 None 1609 """ 1610 self.samrat.SET_DDC2_NCO_FREQ0(value) 1611 1612 def ddc2_nco_frequency1(self, value: int) -> None: 1613 """Configures the 48-bit NCO frequency word 1 of DDC2. 1614 1615 Arguments: 1616 value: 1617 Value to write to the NCO frequency word, such that:\n 1618 When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS\n 1619 When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS 1620 1621 Raises: 1622 None 1623 1624 Returns: 1625 None 1626 """ 1627 self.samrat.SET_DDC2_NCO_FREQ1(value) 1628 1629 def ddc2_nco_frequency2(self, value: int) -> None: 1630 """Configures the 48-bit NCO frequency word 2 of DDC2. 1631 1632 Arguments: 1633 value: 1634 Value to write to the NCO frequency word, such that:\n 1635 When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS\n 1636 When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS 1637 1638 Raises: 1639 None 1640 1641 Returns: 1642 None 1643 """ 1644 self.samrat.SET_DDC2_NCO_FREQ2(value) 1645 1646 def ddc2_nco_frequency3(self, value: int) -> None: 1647 """Configures the 48-bit NCO frequency word 3 of DDC2. 1648 1649 Arguments: 1650 value: 1651 Value to write to the NCO frequency word, such that:\n 1652 When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS\n 1653 When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS 1654 1655 Raises: 1656 None 1657 1658 Returns: 1659 None 1660 """ 1661 self.samrat.SET_DDC2_NCO_FREQ3(value) 1662 1663 def ddc3_nco_frequency0(self, value: int) -> None: 1664 """Configures the 48-bit NCO frequency word 0 of DDC3. 1665 1666 Arguments: 1667 value: 1668 Value to write to the NCO frequency word, such that:\n 1669 When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS\n 1670 When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS 1671 1672 Raises: 1673 None 1674 1675 Returns: 1676 None 1677 """ 1678 self.samrat.SET_DDC3_NCO_FREQ0(value) 1679 1680 def ddc3_nco_frequency1(self, value: int) -> None: 1681 """Configures the 48-bit NCO frequency word 1 of DDC3. 1682 1683 Arguments: 1684 value: 1685 Value to write to the NCO frequency word, such that:\n 1686 When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS\n 1687 When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS 1688 1689 Raises: 1690 None 1691 1692 Returns: 1693 None 1694 """ 1695 self.samrat.SET_DDC3_NCO_FREQ1(value) 1696 1697 def ddc3_nco_frequency2(self, value: int) -> None: 1698 """Configures the 48-bit NCO frequency word 2 of DDC3. 1699 1700 Arguments: 1701 value: 1702 Value to write to the NCO frequency word, such that:\n 1703 When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS\n 1704 When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS 1705 1706 Raises: 1707 None 1708 1709 Returns: 1710 None 1711 """ 1712 self.samrat.SET_DDC3_NCO_FREQ2(value) 1713 1714 def ddc3_nco_frequency3(self, value: int) -> None: 1715 """Configures the 48-bit NCO frequency word 3 of DDC3. 1716 1717 Arguments: 1718 value: 1719 Value to write to the NCO frequency word, such that:\n 1720 When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS\n 1721 When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS 1722 1723 Raises: 1724 None 1725 1726 Returns: 1727 None 1728 """ 1729 self.samrat.SET_DDC3_NCO_FREQ3(value) 1730 1731 def ddc0_nco_phase0(self, value: int) -> None: 1732 """Configures the starting phase for NCO Frequency 0 of DDC0 1733 1734 Arguments: 1735 value: 1736 Value to write to the NCO phase word, such that: 1737 value = 90° / Phase 1738 Raises: 1739 None 1740 1741 Returns: 1742 None 1743 """ 1744 self.samrat.SET_DDC0_NCO_PHASE0(value) 1745 1746 def ddc0_nco_phase1(self, value: int) -> None: 1747 """Configures the starting phase for NCO Frequency 1 of DDC0 1748 1749 Arguments: 1750 value: 1751 Value to write to the NCO phase word, such that: 1752 value = 90° / Phase 1753 Raises: 1754 None 1755 1756 Returns: 1757 None 1758 """ 1759 self.samrat.SET_DDC0_NCO_PHASE1(value) 1760 1761 def ddc0_nco_phase2(self, value: int) -> None: 1762 """Configures the starting phase for NCO Frequency 2 of DDC0 1763 1764 Arguments: 1765 value: 1766 Value to write to the NCO phase word, such that: 1767 value = 90° / Phase 1768 Raises: 1769 None 1770 1771 Returns: 1772 None 1773 """ 1774 self.samrat.SET_DDC0_NCO_PHASE2(value) 1775 1776 def ddc0_nco_phase3(self, value: int) -> None: 1777 """Configures the starting phase for NCO Frequency 3 of DDC0 1778 1779 Arguments: 1780 value: 1781 Value to write to the NCO phase word, such that: 1782 value = 90° / Phase 1783 Raises: 1784 None 1785 1786 Returns: 1787 None 1788 """ 1789 self.samrat.SET_DDC0_NCO_PHASE3(value) 1790 1791 def ddc1_nco_phase0(self, value: int) -> None: 1792 """Configures the starting phase for NCO Frequency 0 of DDC1 1793 1794 Arguments: 1795 value: 1796 Value to write to the NCO phase word, such that: 1797 value = 90° / Phase 1798 Raises: 1799 None 1800 1801 Returns: 1802 None 1803 """ 1804 self.samrat.SET_DDC1_NCO_PHASE0(value) 1805 1806 def ddc1_nco_phase1(self, value: int) -> None: 1807 """Configures the starting phase for NCO Frequency 1 of DDC1 1808 1809 Arguments: 1810 value: 1811 Value to write to the NCO phase word, such that: 1812 value = 90° / Phase 1813 Raises: 1814 None 1815 1816 Returns: 1817 None 1818 """ 1819 self.samrat.SET_DDC1_NCO_PHASE1(value) 1820 1821 def ddc1_nco_phase2(self, value: int) -> None: 1822 """Configures the starting phase for NCO Frequency 2 of DDC1 1823 1824 Arguments: 1825 value: 1826 Value to write to the NCO phase word, such that: 1827 value = 90° / Phase 1828 Raises: 1829 None 1830 1831 Returns: 1832 None 1833 """ 1834 self.samrat.SET_DDC1_NCO_PHASE2(value) 1835 1836 def ddc1_nco_phase3(self, value: int) -> None: 1837 """Configures the starting phase for NCO Frequency 3 of DDC1 1838 1839 Arguments: 1840 value: 1841 Value to write to the NCO phase word, such that: 1842 value = 90° / Phase 1843 Raises: 1844 None 1845 1846 Returns: 1847 None 1848 """ 1849 self.samrat.SET_DDC1_NCO_PHASE3(value) 1850 1851 def ddc2_nco_phase0(self, value: int) -> None: 1852 """Configures the starting phase for NCO Frequency 0 of DDC2 1853 1854 Arguments: 1855 value: 1856 Value to write to the NCO phase word, such that: 1857 value = 90° / Phase 1858 Raises: 1859 None 1860 1861 Returns: 1862 None 1863 """ 1864 self.samrat.SET_DDC2_NCO_PHASE0(value) 1865 1866 def ddc2_nco_phase1(self, value: int) -> None: 1867 """Configures the starting phase for NCO Frequency 1 of DDC2 1868 1869 Arguments: 1870 value: 1871 Value to write to the NCO phase word, such that: 1872 value = 90° / Phase 1873 Raises: 1874 None 1875 1876 Returns: 1877 None 1878 """ 1879 self.samrat.SET_DDC2_NCO_PHASE1(value) 1880 1881 def ddc2_nco_phase2(self, value: int) -> None: 1882 """Configures the starting phase for NCO Frequency 2 of DDC2 1883 1884 Arguments: 1885 value: 1886 Value to write to the NCO phase word, such that: 1887 value = 90° / Phase 1888 Raises: 1889 None 1890 1891 Returns: 1892 None 1893 """ 1894 self.samrat.SET_DDC2_NCO_PHASE2(value) 1895 1896 def ddc2_nco_phase3(self, value: int) -> None: 1897 """Configures the starting phase for NCO Frequency 3 of DDC2 1898 1899 Arguments: 1900 value: 1901 Value to write to the NCO phase word, such that: 1902 value = 90° / Phase 1903 Raises: 1904 None 1905 1906 Returns: 1907 None 1908 """ 1909 self.samrat.SET_DDC2_NCO_PHASE3(value) 1910 1911 def ddc3_nco_phase0(self, value: int) -> None: 1912 """Configures the starting phase for NCO Frequency 0 of DDC3 1913 1914 Arguments: 1915 value: 1916 Value to write to the NCO phase word, such that: 1917 value = 90° / Phase 1918 Raises: 1919 None 1920 1921 Returns: 1922 None 1923 """ 1924 self.samrat.SET_DDC3_NCO_PHASE0(value) 1925 1926 def ddc3_nco_phase1(self, value: int) -> None: 1927 """Configures the starting phase for NCO Frequency 1 of DDC3 1928 1929 Arguments: 1930 value: 1931 Value to write to the NCO phase word, such that: 1932 value = 90° / Phase 1933 Raises: 1934 None 1935 1936 Returns: 1937 None 1938 """ 1939 self.samrat.SET_DDC3_NCO_PHASE1(value) 1940 1941 def ddc3_nco_phase2(self, value: int) -> None: 1942 """Configures the starting phase for NCO Frequency 2 of DDC3 1943 1944 Arguments: 1945 value: 1946 Value to write to the NCO phase word, such that: 1947 value = 90° / Phase 1948 Raises: 1949 None 1950 1951 Returns: 1952 None 1953 """ 1954 self.samrat.SET_DDC3_NCO_PHASE2(value) 1955 1956 def ddc3_nco_phase3(self, value: int) -> None: 1957 """Configures the starting phase for NCO Frequency 3 of DDC3 1958 1959 Arguments: 1960 value: 1961 Value to write to the NCO phase word, such that: 1962 value = 90° / Phase 1963 Raises: 1964 None 1965 1966 Returns: 1967 None 1968 """ 1969 self.samrat.SET_DDC3_NCO_PHASE3(value) 1970 1971 def enable_dclk_divider(self, value: int) -> None: 1972 """Enables the Data Clock divider for higher decimation rates. 1973 1974 Arguments: 1975 value: input value 1976 - 0: DCLK divider is disabled. DCLK is equal to the Sample CLK 1977 - 1: DCLK divider is enabled. DCLK is divided down from Sample CLK 1978 1979 Raises: 1980 None 1981 1982 Returns: 1983 None 1984 """ 1985 self.samrat.SET_DIG_CLK_DDC(value) 1986 1987 def dclk_powerdown(self, value: int) -> None: 1988 """Powers down the LVDS output clock. 1989 1990 Arguments: 1991 value: input value 1992 - 0: Normal operation 1993 - 1: Dclk powered down 1994 1995 Raises: 1996 None 1997 1998 Returns: 1999 None 2000 """ 2001 self.samrat.SET_DCLK_PDN(value) 2002 2003 ###################################################################################################################################### 2004 # ███╗ ███╗ █████╗ ██████╗██████╗ ██████╗ ███████╗ 2005 # ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔═══██╗██╔════╝ 2006 # ██╔████╔██║███████║██║ ██████╔╝██║ ██║███████╗ 2007 # ██║╚██╔╝██║██╔══██║██║ ██╔══██╗██║ ██║╚════██║ 2008 # ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║╚██████╔╝███████║ 2009 # ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝ ╚═════╝ ╚══════╝ 2010 ###################################################################################################################################### 2011 2012 def pulse_overrange_clear(self) -> None: 2013 """Clears the Digital Overrange by pulsing a value of 2 on the OVR_CLR register field 2014 2015 Arguments: 2016 None 2017 2018 Raises: 2019 None 2020 2021 Returns: 2022 None 2023 """ 2024 self.samrat.SET_DIG_OVR_CLEAR(0x0) 2025 sleep(0.1) 2026 self.samrat.SET_DIG_OVR_CLEAR(0x2) 2027 sleep(0.1) 2028 self.samrat.SET_DIG_OVR_CLEAR(0x0) 2029 2030 def invert_lvds_lanes(self, lanes: List[int]) -> None: 2031 """Inverts the polarity of individual LVDS output lanes. 2032 2033 Arguments: 2034 lanes: 2035 List of 16 lanes with the corresponding values: 2036 - 0: Polarity as shown in pin diagram. 2037 - 1: Polarity inverted 2038 2039 Raises: 2040 None 2041 2042 Returns: 2043 None 2044 """ 2045 lanes = int("".join(map(str, lanes)), 2) 2046 self.samrat.SET_LVDS_DATA_INV(lanes) 2047 2048 def powerdown_lvds_lanes(self, lanes: List[int]) -> None: 2049 """Powers down the individual LVDS output lanes and puts LVDS pins into high impedance state. 2050 2051 Arguments: 2052 lanes: 2053 List of bits which enable or disable the LVDS lanes as follows 2054 - 0: Normal operation 2055 - 1: Powered down 2056 2057 Raises: 2058 None 2059 2060 Returns: 2061 None 2062 """ 2063 lanes = int("".join(map(str, lanes)), 2) 2064 self.samrat.SET_LVDS_DATA_PDN(lanes) 2065 2066 def dout_mux(self, lane: int, data: int) -> None: 2067 """Configures the data bus assignments for each individual output lane 2068 2069 Arguments: 2070 lane: 2071 The DOUT output pin to be mapped to 2072 data: 2073 The internal digital data bus lane that is being mapped 2074 2075 Raises: 2076 None 2077 2078 Returns: 2079 None 2080 """ 2081 if lane == 0: 2082 self.samrat.SET_LANE0_MUX_SEL(data) 2083 elif lane == 1: 2084 self.samrat.SET_LANE1_MUX_SEL(data) 2085 elif lane == 2: 2086 self.samrat.SET_LANE2_MUX_SEL(data) 2087 elif lane == 3: 2088 self.samrat.SET_LANE3_MUX_SEL(data) 2089 elif lane == 4: 2090 self.samrat.SET_LANE4_MUX_SEL(data) 2091 elif lane == 5: 2092 self.samrat.SET_LANE5_MUX_SEL(data) 2093 elif lane == 6: 2094 self.samrat.SET_LANE6_MUX_SEL(data) 2095 elif lane == 7: 2096 self.samrat.SET_LANE7_MUX_SEL(data) 2097 elif lane == 8: 2098 self.samrat.SET_LANE8_MUX_SEL(data) 2099 elif lane == 9: 2100 self.samrat.SET_LANE9_MUX_SEL(data) 2101 elif lane == 10: 2102 self.samrat.SET_LANE10_MUX_SEL(data) 2103 elif lane == 11: 2104 self.samrat.SET_LANE11_MUX_SEL(data) 2105 elif lane == 12: 2106 self.samrat.SET_LANE12_MUX_SEL(data) 2107 elif lane == 13: 2108 self.samrat.SET_LANE13_MUX_SEL(data) 2109 elif lane == 14: 2110 self.samrat.SET_LANE14_MUX_SEL(data) 2111 elif lane == 15: 2112 self.samrat.SET_LANE15_MUX_SEL(data) 2113 2114 def lvds_mirror_all(self, lane: int) -> None: 2115 """Mirrors all LVDS lanes to data of chosen lane 2116 2117 Arguments: 2118 lane: 2119 The desired lane data to mirror to all output lanes 2120 2121 Raises: 2122 None 2123 2124 Returns: 2125 None 2126 """ 2127 for i in range(0, 16): 2128 self.dout_mux(i, lane) 2129 2130 def cha_digital_gain(self, value: int) -> None: 2131 """Controls digital gain for channel A. Maximum gain is 6dB. 2132 2133 Arguments: 2134 value: 2135 Desired gain value in dB 2136 2137 Raises: 2138 None 2139 2140 Returns: 2141 None 2142 """ 2143 gain = 20 * log(1 + (value / 128), 10) 2144 self.samrat.SET_CH0_PROG_GAIN(gain) 2145 2146 def chb_digital_gain(self, value: int) -> None: 2147 """Controls digital gain for channel B. Maximum gain is 6dB. 2148 2149 Arguments: 2150 value: 2151 Desired gain value in dB 2152 2153 Raises: 2154 None 2155 2156 Returns: 2157 None 2158 """ 2159 gain = 20 * log(1 + (value / 128), 10) 2160 self.samrat.SET_CH1_PROG_GAIN(gain) 2161 2162 def sysref_pulse(self) -> None: 2163 """Pulses the sysref signal 2164 2165 Arguments: 2166 None 2167 2168 Raises: 2169 None 2170 2171 Returns: 2172 None 2173 """ 2174 self.sysref_mode(0) 2175 sleep(0.1) 2176 self.sysref_mode(3) 2177 sleep(0.1) 2178 self.sysref_mode(0) 2179 2180 def ddc_input_source(self, ddc: int, input: int) -> None: 2181 """Sets the input data source to each of the decimation filters. 2182 2183 Arguments: 2184 ddc: 2185 The DDC for which the input data source is being configured 2186 input: 2187 Input to the DDC 2188 - 0: Channel A 2189 - 1: Channel B 2190 - 2: 2x Average ((ChA + ChB)/2) 2191 - 3: 2x Average ((ChA - ChB)/2) 2192 2193 Raises: 2194 None 2195 2196 Returns: 2197 None 2198 """ 2199 if ddc == 0: 2200 self.samrat.SET_DDC0_MUX(input) 2201 elif ddc == 1: 2202 if input == 0: 2203 input = 1 2204 elif input == 1: 2205 input = 0 2206 self.samrat.SET_DDC1_MUX(input) 2207 elif ddc == 2: 2208 self.samrat.SET_DDC2_MUX(input) 2209 elif ddc == 3: 2210 if input == 0: 2211 input = 1 2212 elif input == 1: 2213 input = 0 2214 self.samrat.SET_DDC3_MUX(input) 2215 2216 def nco_update(self, nco: int) -> None: 2217 """Updates the frequency of the selected NCO by pulsing a value of 1 on the corresponding NCO_UPDATE field 2218 2219 Arguments: 2220 nco: 2221 NCO that is being configured 2222 2223 Raises: 2224 None 2225 2226 Returns: 2227 None 2228 """ 2229 if nco == 0: 2230 self.samrat.SET_NCO0_UPDATE(0) 2231 sleep(0.1) 2232 self.samrat.SET_NCO0_UPDATE(1) 2233 sleep(0.1) 2234 self.samrat.SET_NCO0_UPDATE(1) 2235 elif nco == 1: 2236 self.samrat.SET_NCO1_UPDATE(0) 2237 sleep(0.1) 2238 self.samrat.SET_NCO1_UPDATE(1) 2239 sleep(0.1) 2240 self.samrat.SET_NCO1_UPDATE(1) 2241 elif nco == 2: 2242 self.samrat.SET_NCO2_UPDATE(0) 2243 sleep(0.1) 2244 self.samrat.SET_NCO2_UPDATE(1) 2245 sleep(0.1) 2246 self.samrat.SET_NCO2_UPDATE(1) 2247 elif nco == 3: 2248 self.samrat.SET_NCO3_UPDATE(0) 2249 sleep(0.1) 2250 self.samrat.SET_NCO3_UPDATE(1) 2251 sleep(0.1) 2252 self.samrat.SET_NCO3_UPDATE(1) 2253 2254 def nco_update_common(self) -> None: 2255 """Updates the four NCO frequencies of all NCOs by pulsing a vlaue of 1 on the NCO_COMMON_UPDATE field 2256 2257 Arguments: 2258 None 2259 2260 Raises: 2261 None 2262 2263 Returns: 2264 None 2265 """ 2266 self.samrat.SET_NCO_COMMON_UPDATE(0) 2267 sleep(0.1) 2268 self.samrat.SET_NCO_COMMON_UPDATE(1) 2269 sleep(0.1) 2270 self.samrat.SET_NCO_COMMON_UPDATE(0) 2271 2272 def ddc_nco_select(self, ddc: int, nco: int) -> None: 2273 """These bits select which of the 4 frequencies are active in the respective DDCs/NCOs. 2274 2275 Arguments: 2276 ddc: 2277 DDC of which to configure the nco frequency 2278 nco: 2279 NCO frequency to set as the active frequency 2280 2281 Raises: 2282 None 2283 2284 Returns: 2285 None 2286 """ 2287 if ddc == 0: 2288 self.samrat.SET_DDC0_NCO_SEL(nco) 2289 elif ddc == 1: 2290 self.samrat.SET_DDC1_NCO_SEL(nco) 2291 elif ddc == 2: 2292 self.samrat.SET_DDC2_NCO_SEL(nco) 2293 elif ddc == 3: 2294 self.samrat.SET_DDC3_NCO_SEL(nco) 2295 2296 def ddc_decimation_factor(self, ddc: int, factor: int) -> None: 2297 """Sets the decimation factor for each DDC 2298 2299 Arguments: 2300 ddc: 2301 The DDC for which the decimation factor is being configured 2302 factor: 2303 Desired decimation factor 2304 2305 Raises: 2306 None 2307 2308 Returns: 2309 None 2310 """ 2311 if factor == 0: 2312 n = factor 2313 else: 2314 n = int(log(factor, 2)) 2315 2316 self.samrat.SET_SELECT_INDEPENDENT_DECIMATION( 2317 1 2318 ) # Configure for different decimation factors for each DDC 2319 2320 if ddc == 0: 2321 self.samrat.SET_DDC0_DECIMATION_MODE(n) 2322 elif ddc == 1: 2323 self.samrat.SET_DDC1_DECIMATION_MODE(n) 2324 elif ddc == 2: 2325 self.samrat.SET_DDC2_DECIMATION_MODE(n) 2326 elif ddc == 3: 2327 self.samrat.SET_DDC3_DECIMATION_MODE(n) 2328 2329 def decimation_factor_common(self, factor: int) -> None: 2330 """Enables decimation for all DDCs and sets the common decimation factor for all DDCs 2331 2332 Arguments: 2333 factor: 2334 Desired decimation factor 2335 2336 Raises: 2337 None 2338 2339 Returns: 2340 None 2341 """ 2342 if factor == 0: 2343 n = factor 2344 else: 2345 n = int(log(factor, 2)) 2346 2347 self.samrat.SET_SELECT_INDEPENDENT_DECIMATION( 2348 0 2349 ) # Configure for common decimation factors for all DDCs 2350 self.samrat.SET_COMMON_DECIMATION_MODE(n) 2351 2352 def ddc_nco_frequency(self, ddc: int, nco: int, freq: int) -> None: 2353 """Configures the 48-bit frequency words for the four DDCs/NCOs. 2354 2355 Arguments: 2356 ddc: 2357 DDC of which the frequency is being configured 2358 nco: 2359 NCO frequency which is being configured (0-3) 2360 freq: 2361 Desired frequency 2362 2363 Raises: 2364 None 2365 2366 Returns: 2367 None 2368 """ 2369 if freq > 0: 2370 nco_word = int( 2371 freq * (2**48) / self.fs 2372 ) # Formula for calulating this value is in the datasheet 2373 else: 2374 nco_word = int( 2375 ((self.samrat.fs + freq) * (2**48) / self.fs) - 1 2376 ) # Formula for calulating this value is in the datasheet 2377 2378 if ddc == 0: 2379 if nco == 0: 2380 self.samrat.SET_DDC0_NCO_FREQ0(nco_word) 2381 elif nco == 1: 2382 self.samrat.SET_DDC0_NCO_FREQ1(nco_word) 2383 elif nco == 2: 2384 self.samrat.SET_DDC0_NCO_FREQ2(nco_word) 2385 elif nco == 3: 2386 self.samrat.SET_DDC0_NCO_FREQ3(nco_word) 2387 elif ddc == 1: 2388 if nco == 0: 2389 self.samrat.SET_DDC1_NCO_FREQ0(nco_word) 2390 elif nco == 1: 2391 self.samrat.SET_DDC1_NCO_FREQ1(nco_word) 2392 elif nco == 2: 2393 self.samrat.SET_DDC1_NCO_FREQ2(nco_word) 2394 elif nco == 3: 2395 self.samrat.SET_DDC1_NCO_FREQ3(nco_word) 2396 elif ddc == 2: 2397 if nco == 0: 2398 self.samrat.SET_DDC2_NCO_FREQ0(nco_word) 2399 elif nco == 1: 2400 self.samrat.SET_DDC2_NCO_FREQ1(nco_word) 2401 elif nco == 2: 2402 self.samrat.SET_DDC2_NCO_FREQ2(nco_word) 2403 elif nco == 3: 2404 self.samrat.SET_DDC2_NCO_FREQ3(nco_word) 2405 elif ddc == 3: 2406 if nco == 0: 2407 self.samrat.SET_DDC3_NCO_FREQ0(nco_word) 2408 elif nco == 1: 2409 self.samrat.SET_DDC3_NCO_FREQ1(nco_word) 2410 elif nco == 2: 2411 self.samrat.SET_DDC3_NCO_FREQ2(nco_word) 2412 elif nco == 3: 2413 self.samrat.SET_DDC3_NCO_FREQ3(nco_word) 2414 2415 def ddc_nco_phase(self, ddc: int, nco: int, phase: int) -> None: 2416 """Configure the starting phase of the frequency for the DDCs/NCOs. The phase value is: 90° / <16-bit register> 2417 2418 Arguments: 2419 ddc: 2420 DDC of which the phase is being configured 2421 nco: 2422 NCO of which the phase is being configured 2423 phase: 2424 desired phase in degrees 2425 2426 Raises: 2427 None 2428 2429 Returns: 2430 None 2431 """ 2432 if phase == 0: 2433 phaseval = 0 2434 else: 2435 phaseval = int(90 / phase) 2436 2437 if ddc == 0: 2438 if nco == 0: 2439 self.samrat.SET_DDC0_NCO_PHASE0(phaseval) 2440 elif nco == 1: 2441 self.samrat.SET_DDC0_NCO_PHASE1(phaseval) 2442 elif nco == 2: 2443 self.samrat.SET_DDC0_NCO_PHASE2(phaseval) 2444 elif nco == 3: 2445 self.samrat.SET_DDC0_NCO_PHASE3(phaseval) 2446 elif ddc == 1: 2447 if nco == 0: 2448 self.samrat.SET_DDC0_NCO_PHASE0(phaseval) 2449 elif nco == 1: 2450 self.samrat.SET_DDC1_NCO_PHASE1(phaseval) 2451 elif nco == 2: 2452 self.samrat.SET_DDC2_NCO_PHASE2(phaseval) 2453 elif nco == 3: 2454 self.samrat.SET_DDC3_NCO_PHASE3(phaseval) 2455 elif ddc == 2: 2456 if nco == 0: 2457 self.samrat.SET_DDC0_NCO_PHASE0(phaseval) 2458 elif nco == 1: 2459 self.samrat.SET_DDC1_NCO_PHASE1(phaseval) 2460 elif nco == 2: 2461 self.samrat.SET_DDC2_NCO_PHASE2(phaseval) 2462 elif nco == 3: 2463 self.samrat.SET_DDC3_NCO_PHASE3(phaseval) 2464 elif ddc == 3: 2465 if nco == 0: 2466 self.samrat.SET_DDC0_NCO_PHASE0(phaseval) 2467 elif nco == 1: 2468 self.samrat.SET_DDC1_NCO_PHASE1(phaseval) 2469 elif nco == 2: 2470 self.samrat.SET_DDC2_NCO_PHASE2(phaseval) 2471 elif nco == 3: 2472 self.samrat.SET_DDC3_NCO_PHASE3(phaseval) 2473 2474 def read_all_regs(self) -> None: 2475 """Reads all registers for configuration debug purposes. 2476 2477 Arguments: 2478 None 2479 2480 Raises: 2481 None 2482 2483 Returns: 2484 None 2485 """ 2486 self.samrat.debugReadback()
8class ADC3669: 9 def __init__(self, device_name, device_handle, sample_frequency): 10 self.device_name = device_name 11 self.device = device_handle 12 self.fs = sample_frequency 13 self.samrat = Samrat(device_handle, sample_frequency) 14 15 def reg_read(self, addr: int) -> int: 16 """Reads the value stored in a register 17 18 Arguments: 19 addr: 20 The address of the desired register 21 22 Raises: 23 None 24 25 Returns: 26 The value of the register that is read back 27 """ 28 return self.samrat.read(addr) 29 30 def reg_write(self, addr: int, value: int) -> None: 31 """Writes a value into a register 32 33 Arguments: 34 addr: 35 The address of the desired register 36 value: 37 The value that is to be written to the register 38 39 Raises: 40 None 41 42 Returns: 43 None 44 """ 45 self.samrat.write(addr, value) 46 47 def configure_ready(self) -> int: 48 """Indicates the status of the internal fuse load after HW reset. The device should not be programmed before the fuse load is complete. 49 50 Arguments: 51 None 52 53 Raises: 54 None 55 56 Returns: 57 Status of the fuse autoload. 58 59 - 0: Fuse autoload is incomplete, and the device should not be programmed 60 - 1: Fuse autoload is complete, the device can be programmed 61 """ 62 return self.samrat.GET_FUSE_LOAD_DONE() 63 64 def reset(self) -> None: 65 """Resets the device. The register will self clear after reset. 66 67 Arguments: 68 None 69 70 Raises: 71 None 72 73 Returns: 74 None 75 """ 76 self.samrat.SET_SOFTWARE_RESET(1) 77 78 def global_powerdown(self, value: int) -> None: 79 """Powers down the device. 80 81 Arguments: 82 value: input value 83 - 0: Normal Operation 84 - 1: Powerdown 85 86 Raises: 87 None 88 89 Returns: 90 None 91 """ 92 self.samrat.SET_GLOBAL_PDN(value) 93 94 def fast_powerdown_cha(self, value: int) -> None: 95 """Puts channel A into a low power state that enables a fast wake time. 96 97 Arguments: 98 value: input value 99 - 0: Normal Operation 100 - 1: Powerdown 101 102 Raises: 103 None 104 105 Returns: 106 None 107 """ 108 self.samrat.SET_FAST_PDN_CH0(value) 109 110 def fast_powerdown_chb(self, state: int) -> None: 111 """Puts channel B into a low power state that enables a fast wake time. 112 113 Arguments: 114 value: input value 115 - 0: Normal Operation 116 - 1: Powerdown 117 118 Raises: 119 None 120 121 Returns: 122 None 123 """ 124 self.samrat.SET_FAST_PDN_CH1(state) 125 126 def sysref_detect_clear(self, value: int) -> None: 127 """resets the SYSREF DET flag 128 129 Arguments: 130 value: input value 131 - 0: Normal operation 132 - 1: SYSREF DET flag gets reset 133 134 Raises: 135 None 136 137 Returns: 138 None 139 """ 140 self.samrat.SET_SYSREF_DET_CLR(value) 141 142 def cha_termination(self, value: int) -> None: 143 """Sets the internal termination on channel A. 144 145 Arguments: 146 value: input value 147 - 0: 100Ω differential termination 148 - 1: 200Ω differential termination 149 150 Raises: 151 None 152 153 Returns: 154 None 155 """ 156 self.samrat.SET_CH0_200_OHM_TERM(value) 157 158 def chb_termination(self, value: int) -> None: 159 """Sets the internal termination on channel B. 160 161 Arguments: 162 value: input value 163 - 0: 100Ω differential termination 164 - 1: 200Ω differential termination 165 166 Raises: 167 None 168 169 Returns: 170 None 171 """ 172 self.samrat.SET_CH1_200_OHM_TERM(value) 173 174 def overrange_clear(self, value) -> None: 175 """A transition from 0 to 2 clears the clears the sticky overrange bit. 176 177 Arguments: 178 value: input value 179 - 0: Normal operation 180 - 2: Overrange bit is cleared 181 182 Raises: 183 None 184 185 Returns: 186 None 187 """ 188 self.samrat.SET_DIG_OVR_CLEAR(value) 189 190 def overrange_sticky(self, value: int) -> None: 191 """Makes the digital Overrange sticky. 192 193 Arguments: 194 value: input value 195 - 0: Digital OVR is non-sticky (updated based on overrange_length()) 196 - 1: Digital OVR is sticky (use overrange_clear() to reset) 197 198 Raises: 199 None 200 201 Returns: 202 None 203 """ 204 self.samrat.SET_DIG_OVR_MODE(value) 205 206 def overrange_length(self, value: int) -> None: 207 """Controls the Overrange pulse expansion. The expansion width is specified in terms of number of clock cycles. 208 209 Arguments: 210 value: input value 211 8-bit integer specifying the ovr pulse expansion in number of clock cycles 212 213 Raises: 214 None 215 216 Returns: 217 None 218 """ 219 self.samrat.SET_DIG_OVR_WIDTH(value) 220 221 def lvds_termination(self, value: int) -> None: 222 """Configures the LVDS termination resistance 223 224 Arguments: 225 value: input value 226 - 0: LVDS termination is 50Ω 227 - 1: LVDS termination is 100Ω 228 229 Raises: 230 None 231 232 Returns: 233 None 234 """ 235 self.samrat.SET_HUNDRED_OHM_TERM(value) 236 237 def lvds_half_swing(self, value: int) -> None: 238 """Reduces LVDS output swing by 50% to reduce power consumption 239 240 Arguments: 241 value: input value 242 - 0: Normal output swing 243 - 1: Reduced output swing 244 245 Raises: 246 None 247 248 Returns: 249 None 250 """ 251 self.samrat.SET_LVDS_HALF_SWING_EN(value) 252 253 def data_rate(self, value: int) -> None: 254 """This bit configures the parallel LVDS output interface. When only a single channel is output, SDR LVDS can be enabled. 255 256 Arguments: 257 value: input value 258 - 0: Dual Data Rate (DDR) 259 - 1: Single Data Rate (SDR) 260 261 Raises: 262 None 263 264 Returns: 265 None 266 """ 267 self.samrat.SET_SDR(value) 268 269 def swap_channels(self, value: int) -> None: 270 """Internally swaps channel A and channel B. 271 272 Arguments: 273 value: input value 274 - 0: Normal operation 275 - 1: Channel A and channel B are swapped 276 277 Raises: 278 None 279 280 Returns: 281 None 282 """ 283 self.samrat.SET_SWAP_CHANNELS(value) 284 285 def lvds_data_invert(self, value) -> None: 286 """Inverts the polarity of individual LVDS output lanes. 287 288 Arguments: 289 lanes: 290 Value to write to the register, where each bit represents as listed in the datasheet, and the values correspond to the following functions: 291 - 0: Normal operation 292 - 1: LVDS Lane is inverted 293 294 Raises: 295 None 296 297 Returns: 298 None 299 """ 300 self.samrat.SET_LVDS_DATA_INV(value) 301 302 def lvds_powerdown(self, value: List[int]) -> None: 303 """Powers down the individual LVDS output lanes and puts LVDS pins into high impedance state. 304 305 Arguments: 306 value: input value 307 Value to write to the register, where each bit represents as listed in the datasheet, and the values correspond to the following functions: 308 - 0: Normal operation 309 - 1: Powered down 310 311 Raises: 312 None 313 314 Returns: 315 None 316 """ 317 self.samrat.SET_LVDS_DATA_PDN(value) 318 319 def fclk_duty_cycle(self, value: int) -> None: 320 """Adjusts the Frame clock duty cycle. 321 Arguments: 322 value: input value 323 - 0: FCLK stays high for one DCLK cycle at the beginning of the output sample 324 - 1: FCLK stays high for 50% of the output sample 325 326 Raises: 327 None 328 329 Returns: 330 None 331 """ 332 self.samrat.SET_ENABLE_50PER_DUTY_FCLK(value) 333 334 def fclk_disable(self, value: int) -> None: 335 """Disables the output Frame clock. 336 337 Arguments: 338 value: input value 339 - 0: FCLK replaces the LSB data and is transmitted on DOUT0 340 - 1: FCLK is disabled and the LSB data is transmitted on DOUT0. 341 342 Raises: 343 None 344 345 Returns: 346 None 347 """ 348 self.samrat.SET_DISABLE_FRAME_INSERTION(value) 349 350 def lvds_mux_enable(self, value: int) -> None: 351 """Enables use of the LVDS output mux 352 353 Arguments: 354 value: input value 355 - 0: LVDS Mux disabled 356 - 1: LVDS Mux enabled 357 358 Raises: 359 None 360 361 Returns: 362 None 363 """ 364 self.samrat.SET_LVDS_CROSS_BAR_MUX_EN(value) 365 366 def lvds_swap_edge(self, value: int) -> None: 367 """Swaps the output data bits transmitted on rising and falling edge of DCLK. 368 369 Arguments: 370 value: input value 371 - 0: Normal operation 372 - 1: Output bits on rising and falling edge are swapped. 373 374 Raises: 375 None 376 377 Returns: 378 None 379 """ 380 self.samrat.SET_LVDS_SWAP_RISE_FALL(value) 381 382 def lvds_scrambling(self, value: int) -> None: 383 """Controls the scrambling and LSB insertion configuration on the output data 384 385 Arguments: 386 value: input value 387 - 0: No scrambling, Defualt Operation 388 - 1: Data is XOR'ed with a PRBS bit. This PRBS is inserted on the LSB position 389 - 2: OVR is inserted on the LSB position 390 - 3: OVR is inserted on the LSB+1 position 391 - 4: Data is XOR'ed with a PRBS bit, and the PRBS is inserted on LSB+1 position 392 - 5: OVR is inserted on LSB+1 position, PRBS is inseted on LSB position. Data is XOR'ed with PRBS 393 - 6: OVR is inserted on LSB+2 position, PRBS is inseted on LSB+1 position. Data is XOR'ed with PRBS 394 395 Raises: 396 None 397 398 Returns: 399 None 400 """ 401 self.samrat.SET_LVDS_DATA_DITH_MODE(value) 402 403 def dout0_mux(self, data: int) -> None: 404 """Configures the digital data output on LVDS lane 0 405 406 Arguments: 407 data: 408 The internal digital data bus lane that is being mapped 409 410 Raises: 411 None 412 413 Returns: 414 None 415 """ 416 self.samrat.SET_LANE0_MUX_SEL(data) 417 418 def dout1_mux(self, data: int) -> None: 419 """Configures the digital data output on LVDS lane 1 420 421 Arguments: 422 data: 423 The internal digital data bus lane that is being mapped 424 425 Raises: 426 None 427 428 Returns: 429 None 430 """ 431 self.samrat.SET_LANE1_MUX_SEL(data) 432 433 def dout2_mux(self, data: int) -> None: 434 """Configures the digital data output on LVDS lane 2 435 436 Arguments: 437 data: 438 The internal digital data bus lane that is being mapped 439 440 Raises: 441 None 442 443 Returns: 444 None 445 """ 446 self.samrat.SET_LANE2_MUX_SEL(data) 447 448 def dout3_mux(self, data: int) -> None: 449 """Configures the digital data output on LVDS lane 3 450 451 Arguments: 452 data: 453 The internal digital data bus lane that is being mapped 454 455 Raises: 456 None 457 458 Returns: 459 None 460 """ 461 self.samrat.SET_LANE3_MUX_SEL(data) 462 463 def dout4_mux(self, data: int) -> None: 464 """Configures the digital data output on LVDS lane 4 465 466 Arguments: 467 data: 468 The internal digital data bus lane that is being mapped 469 470 Raises: 471 None 472 473 Returns: 474 None 475 """ 476 self.samrat.SET_LANE4_MUX_SEL(data) 477 478 def dout5_mux(self, data: int) -> None: 479 """Configures the digital data output on LVDS lane 5 480 481 Arguments: 482 data: 483 The internal digital data bus lane that is being mapped 484 485 Raises: 486 None 487 488 Returns: 489 None 490 """ 491 self.samrat.SET_LANE5_MUX_SEL(data) 492 493 def dout6_mux(self, data: int) -> None: 494 """Configures the digital data output on LVDS lane 6 495 496 Arguments: 497 data: 498 The internal digital data bus lane that is being mapped 499 500 Raises: 501 None 502 503 Returns: 504 None 505 """ 506 self.samrat.SET_LANE6_MUX_SEL(data) 507 508 def dout7_mux(self, data: int) -> None: 509 """Configures the digital data output on LVDS lane 7 510 511 Arguments: 512 data: 513 The internal digital data bus lane that is being mapped 514 515 Raises: 516 None 517 518 Returns: 519 None 520 """ 521 self.samrat.SET_LANE7_MUX_SEL(data) 522 523 def dout8_mux(self, data: int) -> None: 524 """Configures the digital data output on LVDS lane 8 525 526 Arguments: 527 data: 528 The internal digital data bus lane that is being mapped 529 530 Raises: 531 None 532 533 Returns: 534 None 535 """ 536 self.samrat.SET_LANE8_MUX_SEL(data) 537 538 def dout9_mux(self, data: int) -> None: 539 """Configures the digital data output on LVDS lane 9 540 541 Arguments: 542 data: 543 The internal digital data bus lane that is being mapped 544 545 Raises: 546 None 547 548 Returns: 549 None 550 """ 551 self.samrat.SET_LANE9_MUX_SEL(data) 552 553 def dout10_mux(self, data: int) -> None: 554 """Configures the digital data output on LVDS lane 10 555 556 Arguments: 557 data: 558 The internal digital data bus lane that is being mapped 559 560 Raises: 561 None 562 563 Returns: 564 None 565 """ 566 self.samrat.SET_LANE10_MUX_SEL(data) 567 568 def dout11_mux(self, data: int) -> None: 569 """Configures the digital data output on LVDS lane 11 570 571 Arguments: 572 data: 573 The internal digital data bus lane that is being mapped 574 575 Raises: 576 None 577 578 Returns: 579 None 580 """ 581 self.samrat.SET_LANE11_MUX_SEL(data) 582 583 def dout12_mux(self, data: int) -> None: 584 """Configures the digital data output on LVDS lane 12 585 586 Arguments: 587 data: 588 The internal digital data bus lane that is being mapped 589 590 Raises: 591 None 592 593 Returns: 594 None 595 """ 596 self.samrat.SET_LANE12_MUX_SEL(data) 597 598 def dout13_mux(self, data: int) -> None: 599 """Configures the digital data output on LVDS lane 13 600 601 Arguments: 602 data: 603 The internal digital data bus lane that is being mapped 604 605 Raises: 606 None 607 608 Returns: 609 None 610 """ 611 self.samrat.SET_LANE13_MUX_SEL(data) 612 613 def dout14_mux(self, data: int) -> None: 614 """Configures the digital data output on LVDS lane 14 615 616 Arguments: 617 data: 618 The internal digital data bus lane that is being mapped 619 620 Raises: 621 None 622 623 Returns: 624 None 625 """ 626 self.samrat.SET_LANE14_MUX_SEL(data) 627 628 def dout15_mux(self, data: int) -> None: 629 """Configures the digital data output on LVDS lane 15 630 631 Arguments: 632 data: 633 The internal digital data bus lane that is being mapped 634 635 Raises: 636 None 637 638 Returns: 639 None 640 """ 641 self.samrat.SET_LANE15_MUX_SEL(data) 642 643 def high_fin(self, value: int) -> None: 644 """Enable for best AC performance for input frequencies greater than 500 MHz 645 646 Arguments: 647 value: input value 648 - 0: Normal operation 649 - 1: Performance optimized for input frequencies greater than 500 MHz 650 651 Raises: 652 None 653 654 Returns: 655 None 656 """ 657 self.samrat.SET_DIS_ANA_NL_CORR(value) 658 659 def sysref_detect(self) -> int: 660 """Indicates if a SYSREF signal is detected. Upon detection this bit stays high until it gets reset (0x102, D6) or a device reset is issued. 661 662 Arguments: 663 None 664 665 Raises: 666 None 667 668 Returns: 669 Status of the Sysref signal 670 671 - 0: No Sysref signal detected 672 - 1: Sysref signal detected 673 """ 674 return self.samrat.GET_SYSREF_DET() 675 676 def sysref_or(self) -> int: 677 """Output of the five SYSREF XOR flags logically OR'ed together 678 679 Arguments: 680 None 681 682 Raises: 683 None 684 685 Returns: 686 Status of the SYSREF flags OR'ed together 687 688 - 0: No sysref flags raised 689 - 1: One of the five XOR flags is raised 690 """ 691 return self.samrat.GET_SYSREF_OR() 692 693 def sysref_xor(self) -> int: 694 """XOR flags from the SYSREF window monitoring circuitry. 695 696 The sampling clock falling edge is used to capture the SYSREF signal. 697 If a SYSREF signal transition happens within -60/+140 ps of the SYSREF capture, the appropriate XOR flag gets raised. 698 These bits are updated on every SYSREF rising edge. 699 700 Arguments: 701 None 702 703 Raises: 704 None 705 706 Returns: 707 List of 5 flags as follows 708 709 - X0: SYSREF leading sample clock by 20 to 60ps 710 - X1: SYSREF leading sample clock by 20ps to 0ps or SYSREF lagging sample clock by 0 to 20ps 711 - X2: SYSREF lagging sample clock by up to 20 to 60ps 712 - X3: SYSREF lagging sample clock by 60 to 100ps 713 - X4: SYSREF lagging sample clock by 100 to 140ps 714 715 With the corresponding values: 716 - 0: Flag not raised 717 - 1: Flag raised 718 """ 719 return self.samrat.GET_SYSREF_XOR() 720 721 def gpio_config(self, value: int) -> None: 722 """Configures the functionaliy of the two GPIO pins 723 724 Arguments: 725 value: input value 726 727 | Value | GPIO 1 | GPIO 0 | 728 |:------:|:-------------------:|:-------------------:| 729 | 0 | NOT USED | SYSREF | 730 | 3 | GLOBAL POWER DOWN | SYSREF | 731 | 4 | EXTERNAL REFERENCE | SYSREF | 732 | 5 | NCO SWITCH 1 | NCO SWITCH 0 | 733 | 8 | NOT USED | SYSREF | 734 | 9 | OVR CHB/CHA | SYSREF | 735 | 10 | NOT USED | GLOBAL POWER DOWN | 736 | 11 | OVR CHB/CHA | GLOBAL POWER DOWN | 737 | 12 | OVR CHB | OVR CHA | 738 739 Raises: 740 None 741 742 Returns: 743 None 744 """ 745 self.samrat.SET_GPIO_CONFIG(value) 746 747 def pattern_clk(self, value: int) -> None: 748 """Controls the clock of the pattern signal generator. 749 750 Arguments: 751 value: input value 752 - 0: Normal operation 753 - 1: Decimation CLK is used for the pattern generator 754 755 Raises: 756 None 757 758 Returns: 759 None 760 """ 761 self.samrat.SET_PATTERN_CLK(value) 762 763 def test_pattern(self, value: int) -> None: 764 """Controls the type of test pattern. 765 766 The generated pattern is 20 bits wide. In 16 bit resolution mode, 16 MSBs of the pattern mode are sent out. 767 In 32 bit resolution mode, 12 zeros are padded to the generated pattern and sent out. 768 769 Arguments: 770 value: input value 771 - 0: Test pattern is disabled 772 - 1: Ramp pattern with a step of 1 (at 20 bit level, which is equivalent to 1/16 at 16 bit level) 773 - 2: Ramp pattern with a step value set by CUSTOM PATTERN. 774 - 3: Not used 775 - 4: Static pattern set by CUSTOM PATTERN 776 - 5: Pattern toggles between CUSTOM PATTERN and invert of CUSTOM PATTERN 777 - 6: Pattern toggles between CUSTOM PATTERN and 0 778 779 Raises: 780 None 781 782 Returns: 783 None 784 """ 785 self.samrat.SET_TEST_PATTERN_MODE(value) 786 787 def custom_pattern(self, value: int) -> None: 788 """Controls the pattern generator. This controls different functions depending on the TEST PATTERN setting 789 790 Arguments: 791 value: 792 20-bit custom pattern data 793 794 Raises: 795 None 796 797 Returns: 798 None 799 """ 800 # if value != 0: 801 # if not ((int(log(value, 2)) + 1) <= 20): 802 # raise Exception("Custom pattern value must be 20 bits long or less") 803 self.samrat.SET_CUSTOM_PATTERN(value) 804 805 def digital_gain_cha(self, value: int) -> None: 806 """Controls digital gain for channel A. Maximum gain is 6dB. 807 808 Arguments: 809 value: 810 Desired value to write into the register, where: 811 Gain = (20 x log(1+(Value / 128))) 812 813 Raises: 814 None 815 816 Returns: 817 None 818 """ 819 self.samrat.SET_CH0_PROG_GAIN(value) 820 821 def digital_gain_chb(self, value: int) -> None: 822 """Controls digital gain for channel B. Maximum gain is 6dB. 823 824 Arguments: 825 value: 826 Desired value to write into the register, where: 827 Gain = (20 x log(1+(Value / 128))) 828 829 Raises: 830 None 831 832 Returns: 833 None 834 """ 835 self.samrat.SET_CH1_PROG_GAIN(value) 836 837 def sysref_mode(self, value: int) -> None: 838 """Controls the global SYSREF mask 839 840 Arguments: 841 value: input value 842 - 0: Pass all SYSREF pulses 843 - 1: Pass the first SYSREF pulse and gates subsequent pulses 844 - 2: Gate all SYSREF pulses 845 - 3: Issue new SYSREF pulse. The pulse is issued when the state transitions to 11 846 847 Raises: 848 None 849 850 Returns: 851 None 852 """ 853 self.samrat.SET_SYSREF_MODE(value) 854 855 def lvds_sysref_mask(self, value: int) -> None: 856 """Controls the SYSREF pulse going to the LVDS block. 857 858 Arguments: 859 value: input value 860 - 0: Pass all SYSREF pulses 861 - 1: Pass the first SYSREF pulse and gates subsequent pulses 862 - 2: Gate all SYSREF pulses 863 - 3: Issue new SYSREF pulse. The pulse is issued when the state transitions to 11 864 865 Raises: 866 None 867 868 Returns: 869 None 870 """ 871 self.samrat.SET_LVDS_SYSREF_MASK(value) 872 873 def ddc_sysref_mask(self, value: int) -> None: 874 """Controls the SYSREF pulse of DDC block. 875 876 Arguments: 877 value: input value 878 - 0: Pass all SYSREF pulses 879 - 1: Pass the first SYSREF pulse and gates subsequent pulses 880 - 2: Gate all SYSREF pulses 881 - 3: Issue new SYSREF pulse. The pulse is issued when the state transitions to 11 882 883 Raises: 884 None 885 886 Returns: 887 None 888 """ 889 self.samrat.SET_DECIMATION_SYSREF_MASK(value) 890 891 def nco_sysref_mask(self, value: int) -> None: 892 """Controls the SYSREF pulse of NCO block. 893 894 Arguments: 895 value: input value 896 - 0: Pass all SYSREF pulses 897 - 1: Pass the first SYSREF pulse and gates subsequent pulses 898 - 2: Gate all SYSREF pulses 899 - 3: Issue new SYSREF pulse. The pulse is issued when the state transitions to 11 900 901 Raises: 902 None 903 904 Returns: 905 None 906 """ 907 self.samrat.SET_NCO_SYSREF_MASK(value) 908 909 def timer_sysref_mask(self, value: int) -> None: 910 """Controls the SYSREF pulse of TIMER block. 911 912 Arguments: 913 value: input value 914 - 0: Pass all SYSREF pulses 915 - 1: Pass the first SYSREF pulse and gates subsequent pulses 916 - 2: Gate all SYSREF pulses 917 - 3: Issue new SYSREF pulse. The pulse is issued when the state transitions to 11 918 919 Raises: 920 None 921 922 Returns: 923 None 924 """ 925 self.samrat.SET_TIMER_SYSREF_MASK(value) 926 927 def sysref_time_stamp(self, value: int) -> None: 928 """Allows the SYSREF to be passed on the FRAME_INDICATOR lane. OVR_ON_LSB setting takes precedence 929 930 Arguments: 931 value: input value 932 - 0: Normal operation 933 - 3: Pass sysref time stamp on the frame indicator lane 934 935 Raises: 936 None 937 938 Returns: 939 None 940 """ 941 self.samrat.SET_SYSREF_TIME_STAMP(value) 942 943 def gain_override(self, value: int) -> None: 944 """Controls 6dB gain setting of the DDC. The 6dB gain is applied in COMPLEX DDC mode by default. This will force 6 dB gain on the DDC output, irrespective of the DDC mode 945 946 Arguments: 947 value: input value 948 - 0: Normal operation 949 - 2: Unity gain 950 - 3: 6dB gain override 951 952 Raises: 953 None 954 955 Returns: 956 None 957 """ 958 self.samrat.SET_SIX_DB_GAIN_OVERRIDE(value) 959 960 def complex_decimation(self, value: int) -> None: 961 """Enables/disables complex decimation for all DDCs. 962 963 Arguments: 964 value: input value 965 - 0: Real Deciamtion 966 - 1: Complex Decimation 967 968 Raises: 969 None 970 971 Returns: 972 None 973 """ 974 self.samrat.SET_EN_COMPLEX_DDC(value) 975 976 def output_resolution(self, value: int) -> None: 977 """Configures the output resolution for 16-bit or 32-bit 978 979 Arguments: 980 value: input value 981 - 0: 16-bit output resolution 982 - 1: 32-bit output resolution 983 984 Raises: 985 None 986 987 Returns: 988 None 989 """ 990 self.samrat.SET_OUTPUT_RESOLUTION(value) 991 992 def output_format(self, value: int) -> None: 993 """Configures the output data format 994 995 Arguments: 996 value: input value 997 - 0: Output format is 2s complement 998 - 1: Output format is offset binary 999 1000 Raises: 1001 None 1002 1003 Returns: 1004 None 1005 """ 1006 self.samrat.SET_OUTPUT_FORMAT(value) 1007 1008 def ddc0_mux(self, input: int) -> None: 1009 """Sets the input data source to decimation filter 0. 1010 1011 Arguments: 1012 ddc: 1013 The DDC for which the input data source is being configured 1014 input: 1015 Input to the DDC 1016 - 0: Channel A 1017 - 1: Channel B 1018 - 2: 2x Average ((ChA + ChB)/2) 1019 - 3: 2x Average ((ChA - ChB)/2) 1020 1021 Raises: 1022 None 1023 1024 Returns: 1025 None 1026 """ 1027 self.samrat.SET_DDC0_MUX(input) 1028 1029 def ddc1_mux(self, input: int) -> None: 1030 """Sets the input data source to decimation filter 1. 1031 1032 Arguments: 1033 ddc: 1034 The DDC for which the input data source is being configured 1035 input: 1036 Input to the DDC 1037 - 0: Channel B 1038 - 1: Channel A 1039 - 2: 2x Average ((ChA + ChB)/2) 1040 - 3: 2x Average ((ChA - ChB)/2) 1041 1042 Raises: 1043 None 1044 1045 Returns: 1046 None 1047 """ 1048 self.samrat.SET_DDC1_MUX(input) 1049 1050 def ddc2_mux(self, input: int) -> None: 1051 """Sets the input data source to decimation filter 2. 1052 1053 Arguments: 1054 ddc: 1055 The DDC for which the input data source is being configured 1056 input: 1057 Input to the DDC 1058 - 0: Channel A 1059 - 1: Channel B 1060 - 2: 2x Average ((ChA + ChB)/2) 1061 - 3: 2x Average ((ChA - ChB)/2) 1062 1063 Raises: 1064 None 1065 1066 Returns: 1067 None 1068 """ 1069 self.samrat.SET_DDC2_MUX(input) 1070 1071 def ddc3_mux(self, input: int) -> None: 1072 """Sets the input data source to decimation filter 3. 1073 1074 Arguments: 1075 ddc: 1076 The DDC for which the input data source is being configured 1077 input: 1078 Input to the DDC 1079 - 0: Channel B 1080 - 1: Channel A 1081 - 2: 2x Average ((ChA + ChB)/2) 1082 - 3: 2x Average ((ChA - ChB)/2) 1083 1084 Raises: 1085 None 1086 1087 Returns: 1088 None 1089 """ 1090 self.samrat.SET_DDC3_MUX(input) 1091 1092 def nco0_update(self, value: int) -> None: 1093 """Updates the four NCO frequencies of NCO0. 1094 1095 Arguments: 1096 value: input value 1097 - 0: Normal operation 1098 - 1: Update NCO0 frequencies 1099 1100 Raises: 1101 None 1102 1103 Returns: 1104 None 1105 """ 1106 self.samrat.SET_NCO0_UPDATE(value) 1107 1108 def nco1_update(self, value: int) -> None: 1109 """Updates the four NCO frequencies of NCO1. 1110 1111 Arguments: 1112 value: input value 1113 - 0: Normal operation 1114 - 1: Update NCO1 frequencies 1115 1116 Raises: 1117 None 1118 1119 Returns: 1120 None 1121 """ 1122 self.samrat.SET_NCO1_UPDATE(value) 1123 1124 def nco2_update(self, value: int) -> None: 1125 """Updates the four NCO frequencies of NCO2. 1126 1127 Arguments: 1128 value: input value 1129 - 0: Normal operation 1130 - 1: Update NCO2 frequencies 1131 1132 Raises: 1133 None 1134 1135 Returns: 1136 None 1137 """ 1138 self.samrat.SET_NCO2_UPDATE(value) 1139 1140 def nco3_update(self, value: int) -> None: 1141 """Updates the four NCO frequencies of NCO3. 1142 1143 Arguments: 1144 value: input value 1145 - 0: Normal operation 1146 - 1: Update NCO3 frequencies 1147 1148 Raises: 1149 None 1150 1151 Returns: 1152 None 1153 """ 1154 self.samrat.SET_NCO3_UPDATE(value) 1155 1156 def select_negative_image(self, value: int) -> None: 1157 """Controls the selection of the negative frequency image. Applicable only in Complex DDC mode. 1158 1159 Arguments: 1160 value: input value 1161 - 0: Normal operation 1162 - 1: Negative image 1163 1164 Raises: 1165 None 1166 1167 Returns: 1168 None 1169 """ 1170 self.samrat.SET_NCO_SEL_NEG_IMAGE(value) 1171 1172 def nco_mode(self, value: int) -> None: 1173 """Configures the NCOs operating mode. 1174 1175 Arguments: 1176 value: input value 1177 - 0: Phase continuous 1178 - 1: Infinite phase coherent 1179 1180 Raises: 1181 None 1182 1183 Returns: 1184 None 1185 """ 1186 self.samrat.SET_NCO_MODE(value) 1187 1188 def low_latency_enable(self, value: int) -> None: 1189 """Enables low latency mode by byapssing all digital features 1190 1191 Arguments: 1192 value: input value 1193 - 0: Normal Operation 1194 - 1: Low Latency Mode 1195 1196 Raises: 1197 None 1198 1199 Returns: 1200 None 1201 """ 1202 self.samrat.SET_ENABLE_LOW_LATENCY(value) 1203 1204 def disable_nco_auto_update(self, value: int) -> None: 1205 """Disables the automatic update when switching the NCOs using GPIO pins 1206 1207 Arguments: 1208 value: input value 1209 - 0: Automatic update enabled 1210 - 1: Automatic update disabled 1211 1212 Raises: 1213 None 1214 1215 Returns: 1216 None 1217 """ 1218 self.samrat.SET_DISABLE_NCO_AUTO_UPDATE(value) 1219 1220 def nco_select_enable(self, value: int) -> None: 1221 """This bit enables NCO frequency selection via SPI register 0x166 instead of GPIO pins. 1222 1223 Arguments: 1224 value: input value 1225 - 0: NCO Select via GPIO Pins 1226 - 1: NCO Select via SPI Write 1227 1228 Raises: 1229 None 1230 1231 Returns: 1232 None 1233 """ 1234 self.samrat.SET_ENABLE_NCO_SEL(value) 1235 1236 def nco_common_update(self, value: int) -> None: 1237 """Updates the four NCO frequencies of all NCOs. 1238 1239 Arguments: 1240 value: input value 1241 - 0: Normal operation 1242 - 1: Update NCO frequencies 1243 1244 Raises: 1245 None 1246 1247 Returns: 1248 None 1249 """ 1250 self.samrat.SET_NCO_COMMON_UPDATE(value) 1251 1252 def ddc0_nco_select(self, nco: int) -> None: 1253 """Selects which of the 4 frequencies is active for DDC0. 1254 1255 Arguments: 1256 nco: 1257 NCO word to set as the active frequency 1258 1259 Raises: 1260 None 1261 1262 Returns: 1263 None 1264 """ 1265 self.samrat.SET_DDC0_NCO_SEL(nco) 1266 1267 def ddc1_nco_select(self, nco: int) -> None: 1268 """Selects which of the 4 frequencies is active for DDC1. 1269 1270 Arguments: 1271 nco: 1272 NCO word to set as the active frequency 1273 1274 Raises: 1275 None 1276 1277 Returns: 1278 None 1279 """ 1280 self.samrat.SET_DDC1_NCO_SEL(nco) 1281 1282 def ddc2_nco_select(self, nco: int) -> None: 1283 """Selects which of the 4 frequencies is active for DDC2. 1284 1285 Arguments: 1286 nco: 1287 NCO word to set as the active frequency 1288 1289 Raises: 1290 None 1291 1292 Returns: 1293 None 1294 """ 1295 self.samrat.SET_DDC2_NCO_SEL(nco) 1296 1297 def ddc3_nco_select(self, nco: int) -> None: 1298 """Selects which of the 4 frequencies is active for DDC3. 1299 1300 Arguments: 1301 nco: 1302 NCO word to set as the active frequency 1303 1304 Raises: 1305 None 1306 1307 Returns: 1308 None 1309 """ 1310 self.samrat.SET_DDC3_NCO_SEL(nco) 1311 1312 def ddc0_decimation(self, value: int) -> None: 1313 """Sets the decimation filter factors for DDC0 when using unequal decimation factors. 1314 1315 Arguments: 1316 value: 1317 value to write to the register such that Decimation Factor = 2^value. 1318 1319 Raises: 1320 None 1321 1322 Returns: 1323 None 1324 """ 1325 self.samrat.SET_DDC0_DECIMATION_MODE(value) 1326 1327 def ddc1_decimation(self, value: int) -> None: 1328 """Sets the decimation filter factors for DDC1 when using unequal decimation factors. 1329 1330 Arguments: 1331 value: 1332 value to write to the register such that Decimation Factor = 2^value. 1333 1334 Raises: 1335 None 1336 1337 Returns: 1338 None 1339 """ 1340 self.samrat.SET_DDC1_DECIMATION_MODE(value) 1341 1342 def ddc2_decimation(self, value: int) -> None: 1343 """Sets the decimation filter factors for DDC2 when using unequal decimation factors. 1344 1345 Arguments: 1346 value: 1347 value to write to the register such that Decimation Factor = 2^value. 1348 1349 Raises: 1350 None 1351 1352 Returns: 1353 None 1354 """ 1355 self.samrat.SET_DDC2_DECIMATION_MODE(value) 1356 1357 def ddc3_decimation(self, value: int) -> None: 1358 """Sets the decimation filter factors for DDC3 when using unequal decimation factors. 1359 1360 Arguments: 1361 value: 1362 value to write to the register such that Decimation Factor = 2^value. 1363 1364 Raises: 1365 None 1366 1367 Returns: 1368 None 1369 """ 1370 self.samrat.SET_DDC3_DECIMATION_MODE(value) 1371 1372 def unequal_decimation(self, value: int) -> None: 1373 """Enables configuration of DDC0 thru DDC3 to have unequal decimation factors. 1374 1375 Arguments: 1376 value: input value 1377 - 0: Normal operation 1378 - 1: Unequal decimation factors enabled 1379 1380 Raises: 1381 None: 1382 1383 Returns: 1384 None 1385 """ 1386 self.samrat.SET_SELECT_INDEPENDENT_DECIMATION(value) 1387 1388 def number_of_ddcs(self, value: int) -> None: 1389 """This register configures the # of active DDCs. 1390 1391 Arguments: 1392 value: input value 1393 - 0: Single DDC per channel (Total two DDCs are enabled) 1394 - 1: Dual DDCs per channel (Total 4 DDCs are enabled) 1395 - 2: Just one DDC is enabled (1 DDC is active) 1396 - 3: Dual DDC for a single channel (Total two DDCs are enabled) 1397 1398 Raises: 1399 None 1400 1401 Returns: 1402 None 1403 """ 1404 lsb = value & 1 1405 msb = value >> 1 1406 self.samrat.SET_EN_DUAL_BAND(lsb) 1407 self.samrat.SET_DIS_DUAL_CHANNEL(msb) 1408 1409 def common_decimation(self, value: int) -> None: 1410 """Sets the decimation filter factor for all active DDCs. 1411 1412 Arguments: 1413 value: 1414 value to write to the register such that Decimation Factor = 2^value. 1415 1416 Raises: 1417 None 1418 1419 Returns: 1420 None 1421 """ 1422 self.samrat.SET_COMMON_DECIMATION_MODE(value) 1423 1424 def update_nyqusit_zone(self, value: int) -> None: 1425 """Must be pulsed after the Nyquist zone if programmed. 1426 1427 A 0 to 1 transition on this bit copies the NYQUIST ZONE field to an internal register. 1428 1429 Argument: 1430 value: input value 1431 - 0: Normal Operation 1432 - 1: Nyquist zone value is updated 1433 1434 Raises: 1435 None 1436 1437 Returns: 1438 None 1439 """ 1440 self.samrat.SET_UPDATE_NYQUIST(value) 1441 1442 def nyquist_zone(self, value: int) -> None: 1443 """Sets the nyquist zone of operation. 1444 1445 The internal calibration of the device depends on the NYQUIST ZONE of the signal being sampled. 1446 This field must be programmed based on the operating Nyquist zone. 1447 1448 Arguments: 1449 value: 1450 Operating nyquist zone (0 - 7) 1451 1452 Raises: 1453 None 1454 1455 Returns: 1456 None 1457 """ 1458 self.samrat.SET_NYQUIST_ZONE(value) 1459 1460 def ddc0_nco_frequency0(self, value: int) -> None: 1461 """Configures the 48-bit NCO frequency word 0 of DDC0. 1462 1463 Arguments: 1464 value: 1465 Value to write to the NCO frequency word, such that:\n 1466 When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS\n 1467 When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS 1468 1469 Raises: 1470 None 1471 1472 Returns: 1473 None 1474 """ 1475 self.samrat.SET_DDC0_NCO_FREQ0(value) 1476 1477 def ddc0_nco_frequency1(self, value: int) -> None: 1478 """Configures the 48-bit NCO frequency word 1 of DDC0. 1479 1480 Arguments: 1481 value: 1482 Value to write to the NCO frequency word, such that:\n 1483 When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS\n 1484 When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS 1485 1486 Raises: 1487 None 1488 1489 Returns: 1490 None 1491 """ 1492 self.samrat.SET_DDC0_NCO_FREQ1(value) 1493 1494 def ddc0_nco_frequency2(self, value: int) -> None: 1495 """Configures the 48-bit NCO frequency word 2 of DDC0. 1496 1497 Arguments: 1498 value: 1499 Value to write to the NCO frequency word, such that:\n 1500 When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS\n 1501 When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS 1502 1503 Raises: 1504 None 1505 1506 Returns: 1507 None 1508 """ 1509 self.samrat.SET_DDC0_NCO_FREQ2(value) 1510 1511 def ddc0_nco_frequency3(self, value: int) -> None: 1512 """Configures the 48-bit NCO frequency word 3 of DDC0. 1513 1514 Arguments: 1515 value: 1516 Value to write to the NCO frequency word, such that:\n 1517 When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS\n 1518 When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS 1519 1520 Raises: 1521 None 1522 1523 Returns: 1524 None 1525 """ 1526 self.samrat.SET_DDC0_NCO_FREQ3(value) 1527 1528 def ddc1_nco_frequency0(self, value: int) -> None: 1529 """Configures the 48-bit NCO frequency word 0 of DDC1. 1530 1531 Arguments: 1532 value: 1533 Value to write to the NCO frequency word, such that:\n 1534 When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS\n 1535 When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS 1536 1537 Raises: 1538 None 1539 1540 Returns: 1541 None 1542 """ 1543 self.samrat.SET_DDC1_NCO_FREQ0(value) 1544 1545 def ddc1_nco_frequency1(self, value: int) -> None: 1546 """Configures the 48-bit NCO frequency word 1 of DDC1. 1547 1548 Arguments: 1549 value: 1550 Value to write to the NCO frequency word, such that:\n 1551 When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS\n 1552 When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS 1553 1554 Raises: 1555 None 1556 1557 Returns: 1558 None 1559 """ 1560 self.samrat.SET_DDC1_NCO_FREQ1(value) 1561 1562 def ddc1_nco_frequency2(self, value: int) -> None: 1563 """Configures the 48-bit NCO frequency word 2 of DDC1. 1564 1565 Arguments: 1566 value: 1567 Value to write to the NCO frequency word, such that:\n 1568 When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS\n 1569 When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS 1570 1571 Raises: 1572 None 1573 1574 Returns: 1575 None 1576 """ 1577 self.samrat.SET_DDC1_NCO_FREQ2(value) 1578 1579 def ddc1_nco_frequency3(self, value: int) -> None: 1580 """Configures the 48-bit NCO frequency word 3 of DDC1. 1581 1582 Arguments: 1583 value: 1584 Value to write to the NCO frequency word, such that:\n 1585 When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS\n 1586 When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS 1587 1588 Raises: 1589 None 1590 1591 Returns: 1592 None 1593 """ 1594 self.samrat.SET_DDC1_NCO_FREQ3(value) 1595 1596 def ddc2_nco_frequency0(self, value: int) -> None: 1597 """Configures the 48-bit NCO frequency word 0 of DDC2. 1598 1599 Arguments: 1600 value: 1601 Value to write to the NCO frequency word, such that:\n 1602 When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS\n 1603 When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS 1604 1605 Raises: 1606 None 1607 1608 Returns: 1609 None 1610 """ 1611 self.samrat.SET_DDC2_NCO_FREQ0(value) 1612 1613 def ddc2_nco_frequency1(self, value: int) -> None: 1614 """Configures the 48-bit NCO frequency word 1 of DDC2. 1615 1616 Arguments: 1617 value: 1618 Value to write to the NCO frequency word, such that:\n 1619 When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS\n 1620 When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS 1621 1622 Raises: 1623 None 1624 1625 Returns: 1626 None 1627 """ 1628 self.samrat.SET_DDC2_NCO_FREQ1(value) 1629 1630 def ddc2_nco_frequency2(self, value: int) -> None: 1631 """Configures the 48-bit NCO frequency word 2 of DDC2. 1632 1633 Arguments: 1634 value: 1635 Value to write to the NCO frequency word, such that:\n 1636 When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS\n 1637 When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS 1638 1639 Raises: 1640 None 1641 1642 Returns: 1643 None 1644 """ 1645 self.samrat.SET_DDC2_NCO_FREQ2(value) 1646 1647 def ddc2_nco_frequency3(self, value: int) -> None: 1648 """Configures the 48-bit NCO frequency word 3 of DDC2. 1649 1650 Arguments: 1651 value: 1652 Value to write to the NCO frequency word, such that:\n 1653 When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS\n 1654 When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS 1655 1656 Raises: 1657 None 1658 1659 Returns: 1660 None 1661 """ 1662 self.samrat.SET_DDC2_NCO_FREQ3(value) 1663 1664 def ddc3_nco_frequency0(self, value: int) -> None: 1665 """Configures the 48-bit NCO frequency word 0 of DDC3. 1666 1667 Arguments: 1668 value: 1669 Value to write to the NCO frequency word, such that:\n 1670 When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS\n 1671 When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS 1672 1673 Raises: 1674 None 1675 1676 Returns: 1677 None 1678 """ 1679 self.samrat.SET_DDC3_NCO_FREQ0(value) 1680 1681 def ddc3_nco_frequency1(self, value: int) -> None: 1682 """Configures the 48-bit NCO frequency word 1 of DDC3. 1683 1684 Arguments: 1685 value: 1686 Value to write to the NCO frequency word, such that:\n 1687 When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS\n 1688 When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS 1689 1690 Raises: 1691 None 1692 1693 Returns: 1694 None 1695 """ 1696 self.samrat.SET_DDC3_NCO_FREQ1(value) 1697 1698 def ddc3_nco_frequency2(self, value: int) -> None: 1699 """Configures the 48-bit NCO frequency word 2 of DDC3. 1700 1701 Arguments: 1702 value: 1703 Value to write to the NCO frequency word, such that:\n 1704 When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS\n 1705 When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS 1706 1707 Raises: 1708 None 1709 1710 Returns: 1711 None 1712 """ 1713 self.samrat.SET_DDC3_NCO_FREQ2(value) 1714 1715 def ddc3_nco_frequency3(self, value: int) -> None: 1716 """Configures the 48-bit NCO frequency word 3 of DDC3. 1717 1718 Arguments: 1719 value: 1720 Value to write to the NCO frequency word, such that:\n 1721 When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS\n 1722 When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS 1723 1724 Raises: 1725 None 1726 1727 Returns: 1728 None 1729 """ 1730 self.samrat.SET_DDC3_NCO_FREQ3(value) 1731 1732 def ddc0_nco_phase0(self, value: int) -> None: 1733 """Configures the starting phase for NCO Frequency 0 of DDC0 1734 1735 Arguments: 1736 value: 1737 Value to write to the NCO phase word, such that: 1738 value = 90° / Phase 1739 Raises: 1740 None 1741 1742 Returns: 1743 None 1744 """ 1745 self.samrat.SET_DDC0_NCO_PHASE0(value) 1746 1747 def ddc0_nco_phase1(self, value: int) -> None: 1748 """Configures the starting phase for NCO Frequency 1 of DDC0 1749 1750 Arguments: 1751 value: 1752 Value to write to the NCO phase word, such that: 1753 value = 90° / Phase 1754 Raises: 1755 None 1756 1757 Returns: 1758 None 1759 """ 1760 self.samrat.SET_DDC0_NCO_PHASE1(value) 1761 1762 def ddc0_nco_phase2(self, value: int) -> None: 1763 """Configures the starting phase for NCO Frequency 2 of DDC0 1764 1765 Arguments: 1766 value: 1767 Value to write to the NCO phase word, such that: 1768 value = 90° / Phase 1769 Raises: 1770 None 1771 1772 Returns: 1773 None 1774 """ 1775 self.samrat.SET_DDC0_NCO_PHASE2(value) 1776 1777 def ddc0_nco_phase3(self, value: int) -> None: 1778 """Configures the starting phase for NCO Frequency 3 of DDC0 1779 1780 Arguments: 1781 value: 1782 Value to write to the NCO phase word, such that: 1783 value = 90° / Phase 1784 Raises: 1785 None 1786 1787 Returns: 1788 None 1789 """ 1790 self.samrat.SET_DDC0_NCO_PHASE3(value) 1791 1792 def ddc1_nco_phase0(self, value: int) -> None: 1793 """Configures the starting phase for NCO Frequency 0 of DDC1 1794 1795 Arguments: 1796 value: 1797 Value to write to the NCO phase word, such that: 1798 value = 90° / Phase 1799 Raises: 1800 None 1801 1802 Returns: 1803 None 1804 """ 1805 self.samrat.SET_DDC1_NCO_PHASE0(value) 1806 1807 def ddc1_nco_phase1(self, value: int) -> None: 1808 """Configures the starting phase for NCO Frequency 1 of DDC1 1809 1810 Arguments: 1811 value: 1812 Value to write to the NCO phase word, such that: 1813 value = 90° / Phase 1814 Raises: 1815 None 1816 1817 Returns: 1818 None 1819 """ 1820 self.samrat.SET_DDC1_NCO_PHASE1(value) 1821 1822 def ddc1_nco_phase2(self, value: int) -> None: 1823 """Configures the starting phase for NCO Frequency 2 of DDC1 1824 1825 Arguments: 1826 value: 1827 Value to write to the NCO phase word, such that: 1828 value = 90° / Phase 1829 Raises: 1830 None 1831 1832 Returns: 1833 None 1834 """ 1835 self.samrat.SET_DDC1_NCO_PHASE2(value) 1836 1837 def ddc1_nco_phase3(self, value: int) -> None: 1838 """Configures the starting phase for NCO Frequency 3 of DDC1 1839 1840 Arguments: 1841 value: 1842 Value to write to the NCO phase word, such that: 1843 value = 90° / Phase 1844 Raises: 1845 None 1846 1847 Returns: 1848 None 1849 """ 1850 self.samrat.SET_DDC1_NCO_PHASE3(value) 1851 1852 def ddc2_nco_phase0(self, value: int) -> None: 1853 """Configures the starting phase for NCO Frequency 0 of DDC2 1854 1855 Arguments: 1856 value: 1857 Value to write to the NCO phase word, such that: 1858 value = 90° / Phase 1859 Raises: 1860 None 1861 1862 Returns: 1863 None 1864 """ 1865 self.samrat.SET_DDC2_NCO_PHASE0(value) 1866 1867 def ddc2_nco_phase1(self, value: int) -> None: 1868 """Configures the starting phase for NCO Frequency 1 of DDC2 1869 1870 Arguments: 1871 value: 1872 Value to write to the NCO phase word, such that: 1873 value = 90° / Phase 1874 Raises: 1875 None 1876 1877 Returns: 1878 None 1879 """ 1880 self.samrat.SET_DDC2_NCO_PHASE1(value) 1881 1882 def ddc2_nco_phase2(self, value: int) -> None: 1883 """Configures the starting phase for NCO Frequency 2 of DDC2 1884 1885 Arguments: 1886 value: 1887 Value to write to the NCO phase word, such that: 1888 value = 90° / Phase 1889 Raises: 1890 None 1891 1892 Returns: 1893 None 1894 """ 1895 self.samrat.SET_DDC2_NCO_PHASE2(value) 1896 1897 def ddc2_nco_phase3(self, value: int) -> None: 1898 """Configures the starting phase for NCO Frequency 3 of DDC2 1899 1900 Arguments: 1901 value: 1902 Value to write to the NCO phase word, such that: 1903 value = 90° / Phase 1904 Raises: 1905 None 1906 1907 Returns: 1908 None 1909 """ 1910 self.samrat.SET_DDC2_NCO_PHASE3(value) 1911 1912 def ddc3_nco_phase0(self, value: int) -> None: 1913 """Configures the starting phase for NCO Frequency 0 of DDC3 1914 1915 Arguments: 1916 value: 1917 Value to write to the NCO phase word, such that: 1918 value = 90° / Phase 1919 Raises: 1920 None 1921 1922 Returns: 1923 None 1924 """ 1925 self.samrat.SET_DDC3_NCO_PHASE0(value) 1926 1927 def ddc3_nco_phase1(self, value: int) -> None: 1928 """Configures the starting phase for NCO Frequency 1 of DDC3 1929 1930 Arguments: 1931 value: 1932 Value to write to the NCO phase word, such that: 1933 value = 90° / Phase 1934 Raises: 1935 None 1936 1937 Returns: 1938 None 1939 """ 1940 self.samrat.SET_DDC3_NCO_PHASE1(value) 1941 1942 def ddc3_nco_phase2(self, value: int) -> None: 1943 """Configures the starting phase for NCO Frequency 2 of DDC3 1944 1945 Arguments: 1946 value: 1947 Value to write to the NCO phase word, such that: 1948 value = 90° / Phase 1949 Raises: 1950 None 1951 1952 Returns: 1953 None 1954 """ 1955 self.samrat.SET_DDC3_NCO_PHASE2(value) 1956 1957 def ddc3_nco_phase3(self, value: int) -> None: 1958 """Configures the starting phase for NCO Frequency 3 of DDC3 1959 1960 Arguments: 1961 value: 1962 Value to write to the NCO phase word, such that: 1963 value = 90° / Phase 1964 Raises: 1965 None 1966 1967 Returns: 1968 None 1969 """ 1970 self.samrat.SET_DDC3_NCO_PHASE3(value) 1971 1972 def enable_dclk_divider(self, value: int) -> None: 1973 """Enables the Data Clock divider for higher decimation rates. 1974 1975 Arguments: 1976 value: input value 1977 - 0: DCLK divider is disabled. DCLK is equal to the Sample CLK 1978 - 1: DCLK divider is enabled. DCLK is divided down from Sample CLK 1979 1980 Raises: 1981 None 1982 1983 Returns: 1984 None 1985 """ 1986 self.samrat.SET_DIG_CLK_DDC(value) 1987 1988 def dclk_powerdown(self, value: int) -> None: 1989 """Powers down the LVDS output clock. 1990 1991 Arguments: 1992 value: input value 1993 - 0: Normal operation 1994 - 1: Dclk powered down 1995 1996 Raises: 1997 None 1998 1999 Returns: 2000 None 2001 """ 2002 self.samrat.SET_DCLK_PDN(value) 2003 2004 ###################################################################################################################################### 2005 # ███╗ ███╗ █████╗ ██████╗██████╗ ██████╗ ███████╗ 2006 # ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔═══██╗██╔════╝ 2007 # ██╔████╔██║███████║██║ ██████╔╝██║ ██║███████╗ 2008 # ██║╚██╔╝██║██╔══██║██║ ██╔══██╗██║ ██║╚════██║ 2009 # ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║╚██████╔╝███████║ 2010 # ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝ ╚═════╝ ╚══════╝ 2011 ###################################################################################################################################### 2012 2013 def pulse_overrange_clear(self) -> None: 2014 """Clears the Digital Overrange by pulsing a value of 2 on the OVR_CLR register field 2015 2016 Arguments: 2017 None 2018 2019 Raises: 2020 None 2021 2022 Returns: 2023 None 2024 """ 2025 self.samrat.SET_DIG_OVR_CLEAR(0x0) 2026 sleep(0.1) 2027 self.samrat.SET_DIG_OVR_CLEAR(0x2) 2028 sleep(0.1) 2029 self.samrat.SET_DIG_OVR_CLEAR(0x0) 2030 2031 def invert_lvds_lanes(self, lanes: List[int]) -> None: 2032 """Inverts the polarity of individual LVDS output lanes. 2033 2034 Arguments: 2035 lanes: 2036 List of 16 lanes with the corresponding values: 2037 - 0: Polarity as shown in pin diagram. 2038 - 1: Polarity inverted 2039 2040 Raises: 2041 None 2042 2043 Returns: 2044 None 2045 """ 2046 lanes = int("".join(map(str, lanes)), 2) 2047 self.samrat.SET_LVDS_DATA_INV(lanes) 2048 2049 def powerdown_lvds_lanes(self, lanes: List[int]) -> None: 2050 """Powers down the individual LVDS output lanes and puts LVDS pins into high impedance state. 2051 2052 Arguments: 2053 lanes: 2054 List of bits which enable or disable the LVDS lanes as follows 2055 - 0: Normal operation 2056 - 1: Powered down 2057 2058 Raises: 2059 None 2060 2061 Returns: 2062 None 2063 """ 2064 lanes = int("".join(map(str, lanes)), 2) 2065 self.samrat.SET_LVDS_DATA_PDN(lanes) 2066 2067 def dout_mux(self, lane: int, data: int) -> None: 2068 """Configures the data bus assignments for each individual output lane 2069 2070 Arguments: 2071 lane: 2072 The DOUT output pin to be mapped to 2073 data: 2074 The internal digital data bus lane that is being mapped 2075 2076 Raises: 2077 None 2078 2079 Returns: 2080 None 2081 """ 2082 if lane == 0: 2083 self.samrat.SET_LANE0_MUX_SEL(data) 2084 elif lane == 1: 2085 self.samrat.SET_LANE1_MUX_SEL(data) 2086 elif lane == 2: 2087 self.samrat.SET_LANE2_MUX_SEL(data) 2088 elif lane == 3: 2089 self.samrat.SET_LANE3_MUX_SEL(data) 2090 elif lane == 4: 2091 self.samrat.SET_LANE4_MUX_SEL(data) 2092 elif lane == 5: 2093 self.samrat.SET_LANE5_MUX_SEL(data) 2094 elif lane == 6: 2095 self.samrat.SET_LANE6_MUX_SEL(data) 2096 elif lane == 7: 2097 self.samrat.SET_LANE7_MUX_SEL(data) 2098 elif lane == 8: 2099 self.samrat.SET_LANE8_MUX_SEL(data) 2100 elif lane == 9: 2101 self.samrat.SET_LANE9_MUX_SEL(data) 2102 elif lane == 10: 2103 self.samrat.SET_LANE10_MUX_SEL(data) 2104 elif lane == 11: 2105 self.samrat.SET_LANE11_MUX_SEL(data) 2106 elif lane == 12: 2107 self.samrat.SET_LANE12_MUX_SEL(data) 2108 elif lane == 13: 2109 self.samrat.SET_LANE13_MUX_SEL(data) 2110 elif lane == 14: 2111 self.samrat.SET_LANE14_MUX_SEL(data) 2112 elif lane == 15: 2113 self.samrat.SET_LANE15_MUX_SEL(data) 2114 2115 def lvds_mirror_all(self, lane: int) -> None: 2116 """Mirrors all LVDS lanes to data of chosen lane 2117 2118 Arguments: 2119 lane: 2120 The desired lane data to mirror to all output lanes 2121 2122 Raises: 2123 None 2124 2125 Returns: 2126 None 2127 """ 2128 for i in range(0, 16): 2129 self.dout_mux(i, lane) 2130 2131 def cha_digital_gain(self, value: int) -> None: 2132 """Controls digital gain for channel A. Maximum gain is 6dB. 2133 2134 Arguments: 2135 value: 2136 Desired gain value in dB 2137 2138 Raises: 2139 None 2140 2141 Returns: 2142 None 2143 """ 2144 gain = 20 * log(1 + (value / 128), 10) 2145 self.samrat.SET_CH0_PROG_GAIN(gain) 2146 2147 def chb_digital_gain(self, value: int) -> None: 2148 """Controls digital gain for channel B. Maximum gain is 6dB. 2149 2150 Arguments: 2151 value: 2152 Desired gain value in dB 2153 2154 Raises: 2155 None 2156 2157 Returns: 2158 None 2159 """ 2160 gain = 20 * log(1 + (value / 128), 10) 2161 self.samrat.SET_CH1_PROG_GAIN(gain) 2162 2163 def sysref_pulse(self) -> None: 2164 """Pulses the sysref signal 2165 2166 Arguments: 2167 None 2168 2169 Raises: 2170 None 2171 2172 Returns: 2173 None 2174 """ 2175 self.sysref_mode(0) 2176 sleep(0.1) 2177 self.sysref_mode(3) 2178 sleep(0.1) 2179 self.sysref_mode(0) 2180 2181 def ddc_input_source(self, ddc: int, input: int) -> None: 2182 """Sets the input data source to each of the decimation filters. 2183 2184 Arguments: 2185 ddc: 2186 The DDC for which the input data source is being configured 2187 input: 2188 Input to the DDC 2189 - 0: Channel A 2190 - 1: Channel B 2191 - 2: 2x Average ((ChA + ChB)/2) 2192 - 3: 2x Average ((ChA - ChB)/2) 2193 2194 Raises: 2195 None 2196 2197 Returns: 2198 None 2199 """ 2200 if ddc == 0: 2201 self.samrat.SET_DDC0_MUX(input) 2202 elif ddc == 1: 2203 if input == 0: 2204 input = 1 2205 elif input == 1: 2206 input = 0 2207 self.samrat.SET_DDC1_MUX(input) 2208 elif ddc == 2: 2209 self.samrat.SET_DDC2_MUX(input) 2210 elif ddc == 3: 2211 if input == 0: 2212 input = 1 2213 elif input == 1: 2214 input = 0 2215 self.samrat.SET_DDC3_MUX(input) 2216 2217 def nco_update(self, nco: int) -> None: 2218 """Updates the frequency of the selected NCO by pulsing a value of 1 on the corresponding NCO_UPDATE field 2219 2220 Arguments: 2221 nco: 2222 NCO that is being configured 2223 2224 Raises: 2225 None 2226 2227 Returns: 2228 None 2229 """ 2230 if nco == 0: 2231 self.samrat.SET_NCO0_UPDATE(0) 2232 sleep(0.1) 2233 self.samrat.SET_NCO0_UPDATE(1) 2234 sleep(0.1) 2235 self.samrat.SET_NCO0_UPDATE(1) 2236 elif nco == 1: 2237 self.samrat.SET_NCO1_UPDATE(0) 2238 sleep(0.1) 2239 self.samrat.SET_NCO1_UPDATE(1) 2240 sleep(0.1) 2241 self.samrat.SET_NCO1_UPDATE(1) 2242 elif nco == 2: 2243 self.samrat.SET_NCO2_UPDATE(0) 2244 sleep(0.1) 2245 self.samrat.SET_NCO2_UPDATE(1) 2246 sleep(0.1) 2247 self.samrat.SET_NCO2_UPDATE(1) 2248 elif nco == 3: 2249 self.samrat.SET_NCO3_UPDATE(0) 2250 sleep(0.1) 2251 self.samrat.SET_NCO3_UPDATE(1) 2252 sleep(0.1) 2253 self.samrat.SET_NCO3_UPDATE(1) 2254 2255 def nco_update_common(self) -> None: 2256 """Updates the four NCO frequencies of all NCOs by pulsing a vlaue of 1 on the NCO_COMMON_UPDATE field 2257 2258 Arguments: 2259 None 2260 2261 Raises: 2262 None 2263 2264 Returns: 2265 None 2266 """ 2267 self.samrat.SET_NCO_COMMON_UPDATE(0) 2268 sleep(0.1) 2269 self.samrat.SET_NCO_COMMON_UPDATE(1) 2270 sleep(0.1) 2271 self.samrat.SET_NCO_COMMON_UPDATE(0) 2272 2273 def ddc_nco_select(self, ddc: int, nco: int) -> None: 2274 """These bits select which of the 4 frequencies are active in the respective DDCs/NCOs. 2275 2276 Arguments: 2277 ddc: 2278 DDC of which to configure the nco frequency 2279 nco: 2280 NCO frequency to set as the active frequency 2281 2282 Raises: 2283 None 2284 2285 Returns: 2286 None 2287 """ 2288 if ddc == 0: 2289 self.samrat.SET_DDC0_NCO_SEL(nco) 2290 elif ddc == 1: 2291 self.samrat.SET_DDC1_NCO_SEL(nco) 2292 elif ddc == 2: 2293 self.samrat.SET_DDC2_NCO_SEL(nco) 2294 elif ddc == 3: 2295 self.samrat.SET_DDC3_NCO_SEL(nco) 2296 2297 def ddc_decimation_factor(self, ddc: int, factor: int) -> None: 2298 """Sets the decimation factor for each DDC 2299 2300 Arguments: 2301 ddc: 2302 The DDC for which the decimation factor is being configured 2303 factor: 2304 Desired decimation factor 2305 2306 Raises: 2307 None 2308 2309 Returns: 2310 None 2311 """ 2312 if factor == 0: 2313 n = factor 2314 else: 2315 n = int(log(factor, 2)) 2316 2317 self.samrat.SET_SELECT_INDEPENDENT_DECIMATION( 2318 1 2319 ) # Configure for different decimation factors for each DDC 2320 2321 if ddc == 0: 2322 self.samrat.SET_DDC0_DECIMATION_MODE(n) 2323 elif ddc == 1: 2324 self.samrat.SET_DDC1_DECIMATION_MODE(n) 2325 elif ddc == 2: 2326 self.samrat.SET_DDC2_DECIMATION_MODE(n) 2327 elif ddc == 3: 2328 self.samrat.SET_DDC3_DECIMATION_MODE(n) 2329 2330 def decimation_factor_common(self, factor: int) -> None: 2331 """Enables decimation for all DDCs and sets the common decimation factor for all DDCs 2332 2333 Arguments: 2334 factor: 2335 Desired decimation factor 2336 2337 Raises: 2338 None 2339 2340 Returns: 2341 None 2342 """ 2343 if factor == 0: 2344 n = factor 2345 else: 2346 n = int(log(factor, 2)) 2347 2348 self.samrat.SET_SELECT_INDEPENDENT_DECIMATION( 2349 0 2350 ) # Configure for common decimation factors for all DDCs 2351 self.samrat.SET_COMMON_DECIMATION_MODE(n) 2352 2353 def ddc_nco_frequency(self, ddc: int, nco: int, freq: int) -> None: 2354 """Configures the 48-bit frequency words for the four DDCs/NCOs. 2355 2356 Arguments: 2357 ddc: 2358 DDC of which the frequency is being configured 2359 nco: 2360 NCO frequency which is being configured (0-3) 2361 freq: 2362 Desired frequency 2363 2364 Raises: 2365 None 2366 2367 Returns: 2368 None 2369 """ 2370 if freq > 0: 2371 nco_word = int( 2372 freq * (2**48) / self.fs 2373 ) # Formula for calulating this value is in the datasheet 2374 else: 2375 nco_word = int( 2376 ((self.samrat.fs + freq) * (2**48) / self.fs) - 1 2377 ) # Formula for calulating this value is in the datasheet 2378 2379 if ddc == 0: 2380 if nco == 0: 2381 self.samrat.SET_DDC0_NCO_FREQ0(nco_word) 2382 elif nco == 1: 2383 self.samrat.SET_DDC0_NCO_FREQ1(nco_word) 2384 elif nco == 2: 2385 self.samrat.SET_DDC0_NCO_FREQ2(nco_word) 2386 elif nco == 3: 2387 self.samrat.SET_DDC0_NCO_FREQ3(nco_word) 2388 elif ddc == 1: 2389 if nco == 0: 2390 self.samrat.SET_DDC1_NCO_FREQ0(nco_word) 2391 elif nco == 1: 2392 self.samrat.SET_DDC1_NCO_FREQ1(nco_word) 2393 elif nco == 2: 2394 self.samrat.SET_DDC1_NCO_FREQ2(nco_word) 2395 elif nco == 3: 2396 self.samrat.SET_DDC1_NCO_FREQ3(nco_word) 2397 elif ddc == 2: 2398 if nco == 0: 2399 self.samrat.SET_DDC2_NCO_FREQ0(nco_word) 2400 elif nco == 1: 2401 self.samrat.SET_DDC2_NCO_FREQ1(nco_word) 2402 elif nco == 2: 2403 self.samrat.SET_DDC2_NCO_FREQ2(nco_word) 2404 elif nco == 3: 2405 self.samrat.SET_DDC2_NCO_FREQ3(nco_word) 2406 elif ddc == 3: 2407 if nco == 0: 2408 self.samrat.SET_DDC3_NCO_FREQ0(nco_word) 2409 elif nco == 1: 2410 self.samrat.SET_DDC3_NCO_FREQ1(nco_word) 2411 elif nco == 2: 2412 self.samrat.SET_DDC3_NCO_FREQ2(nco_word) 2413 elif nco == 3: 2414 self.samrat.SET_DDC3_NCO_FREQ3(nco_word) 2415 2416 def ddc_nco_phase(self, ddc: int, nco: int, phase: int) -> None: 2417 """Configure the starting phase of the frequency for the DDCs/NCOs. The phase value is: 90° / <16-bit register> 2418 2419 Arguments: 2420 ddc: 2421 DDC of which the phase is being configured 2422 nco: 2423 NCO of which the phase is being configured 2424 phase: 2425 desired phase in degrees 2426 2427 Raises: 2428 None 2429 2430 Returns: 2431 None 2432 """ 2433 if phase == 0: 2434 phaseval = 0 2435 else: 2436 phaseval = int(90 / phase) 2437 2438 if ddc == 0: 2439 if nco == 0: 2440 self.samrat.SET_DDC0_NCO_PHASE0(phaseval) 2441 elif nco == 1: 2442 self.samrat.SET_DDC0_NCO_PHASE1(phaseval) 2443 elif nco == 2: 2444 self.samrat.SET_DDC0_NCO_PHASE2(phaseval) 2445 elif nco == 3: 2446 self.samrat.SET_DDC0_NCO_PHASE3(phaseval) 2447 elif ddc == 1: 2448 if nco == 0: 2449 self.samrat.SET_DDC0_NCO_PHASE0(phaseval) 2450 elif nco == 1: 2451 self.samrat.SET_DDC1_NCO_PHASE1(phaseval) 2452 elif nco == 2: 2453 self.samrat.SET_DDC2_NCO_PHASE2(phaseval) 2454 elif nco == 3: 2455 self.samrat.SET_DDC3_NCO_PHASE3(phaseval) 2456 elif ddc == 2: 2457 if nco == 0: 2458 self.samrat.SET_DDC0_NCO_PHASE0(phaseval) 2459 elif nco == 1: 2460 self.samrat.SET_DDC1_NCO_PHASE1(phaseval) 2461 elif nco == 2: 2462 self.samrat.SET_DDC2_NCO_PHASE2(phaseval) 2463 elif nco == 3: 2464 self.samrat.SET_DDC3_NCO_PHASE3(phaseval) 2465 elif ddc == 3: 2466 if nco == 0: 2467 self.samrat.SET_DDC0_NCO_PHASE0(phaseval) 2468 elif nco == 1: 2469 self.samrat.SET_DDC1_NCO_PHASE1(phaseval) 2470 elif nco == 2: 2471 self.samrat.SET_DDC2_NCO_PHASE2(phaseval) 2472 elif nco == 3: 2473 self.samrat.SET_DDC3_NCO_PHASE3(phaseval) 2474 2475 def read_all_regs(self) -> None: 2476 """Reads all registers for configuration debug purposes. 2477 2478 Arguments: 2479 None 2480 2481 Raises: 2482 None 2483 2484 Returns: 2485 None 2486 """ 2487 self.samrat.debugReadback()
15 def reg_read(self, addr: int) -> int: 16 """Reads the value stored in a register 17 18 Arguments: 19 addr: 20 The address of the desired register 21 22 Raises: 23 None 24 25 Returns: 26 The value of the register that is read back 27 """ 28 return self.samrat.read(addr)
Reads the value stored in a register
Arguments:
- addr: The address of the desired register
Raises:
- None
Returns:
The value of the register that is read back
30 def reg_write(self, addr: int, value: int) -> None: 31 """Writes a value into a register 32 33 Arguments: 34 addr: 35 The address of the desired register 36 value: 37 The value that is to be written to the register 38 39 Raises: 40 None 41 42 Returns: 43 None 44 """ 45 self.samrat.write(addr, value)
Writes a value into a register
Arguments:
- addr: The address of the desired register
- value: The value that is to be written to the register
Raises:
- None
Returns:
None
47 def configure_ready(self) -> int: 48 """Indicates the status of the internal fuse load after HW reset. The device should not be programmed before the fuse load is complete. 49 50 Arguments: 51 None 52 53 Raises: 54 None 55 56 Returns: 57 Status of the fuse autoload. 58 59 - 0: Fuse autoload is incomplete, and the device should not be programmed 60 - 1: Fuse autoload is complete, the device can be programmed 61 """ 62 return self.samrat.GET_FUSE_LOAD_DONE()
Indicates the status of the internal fuse load after HW reset. The device should not be programmed before the fuse load is complete.
Arguments:
- None
Raises:
- None
Returns:
Status of the fuse autoload.
- 0: Fuse autoload is incomplete, and the device should not be programmed
- 1: Fuse autoload is complete, the device can be programmed
64 def reset(self) -> None: 65 """Resets the device. The register will self clear after reset. 66 67 Arguments: 68 None 69 70 Raises: 71 None 72 73 Returns: 74 None 75 """ 76 self.samrat.SET_SOFTWARE_RESET(1)
Resets the device. The register will self clear after reset.
Arguments:
- None
Raises:
- None
Returns:
None
78 def global_powerdown(self, value: int) -> None: 79 """Powers down the device. 80 81 Arguments: 82 value: input value 83 - 0: Normal Operation 84 - 1: Powerdown 85 86 Raises: 87 None 88 89 Returns: 90 None 91 """ 92 self.samrat.SET_GLOBAL_PDN(value)
Powers down the device.
Arguments:
- value: input value
- 0: Normal Operation
- 1: Powerdown
Raises:
- None
Returns:
None
94 def fast_powerdown_cha(self, value: int) -> None: 95 """Puts channel A into a low power state that enables a fast wake time. 96 97 Arguments: 98 value: input value 99 - 0: Normal Operation 100 - 1: Powerdown 101 102 Raises: 103 None 104 105 Returns: 106 None 107 """ 108 self.samrat.SET_FAST_PDN_CH0(value)
Puts channel A into a low power state that enables a fast wake time.
Arguments:
- value: input value
- 0: Normal Operation
- 1: Powerdown
Raises:
- None
Returns:
None
110 def fast_powerdown_chb(self, state: int) -> None: 111 """Puts channel B into a low power state that enables a fast wake time. 112 113 Arguments: 114 value: input value 115 - 0: Normal Operation 116 - 1: Powerdown 117 118 Raises: 119 None 120 121 Returns: 122 None 123 """ 124 self.samrat.SET_FAST_PDN_CH1(state)
Puts channel B into a low power state that enables a fast wake time.
Arguments:
- value: input value
- 0: Normal Operation
- 1: Powerdown
Raises:
- None
Returns:
None
126 def sysref_detect_clear(self, value: int) -> None: 127 """resets the SYSREF DET flag 128 129 Arguments: 130 value: input value 131 - 0: Normal operation 132 - 1: SYSREF DET flag gets reset 133 134 Raises: 135 None 136 137 Returns: 138 None 139 """ 140 self.samrat.SET_SYSREF_DET_CLR(value)
resets the SYSREF DET flag
Arguments:
- value: input value
- 0: Normal operation
- 1: SYSREF DET flag gets reset
Raises:
- None
Returns:
None
142 def cha_termination(self, value: int) -> None: 143 """Sets the internal termination on channel A. 144 145 Arguments: 146 value: input value 147 - 0: 100Ω differential termination 148 - 1: 200Ω differential termination 149 150 Raises: 151 None 152 153 Returns: 154 None 155 """ 156 self.samrat.SET_CH0_200_OHM_TERM(value)
Sets the internal termination on channel A.
Arguments:
- value: input value
- 0: 100Ω differential termination
- 1: 200Ω differential termination
Raises:
- None
Returns:
None
158 def chb_termination(self, value: int) -> None: 159 """Sets the internal termination on channel B. 160 161 Arguments: 162 value: input value 163 - 0: 100Ω differential termination 164 - 1: 200Ω differential termination 165 166 Raises: 167 None 168 169 Returns: 170 None 171 """ 172 self.samrat.SET_CH1_200_OHM_TERM(value)
Sets the internal termination on channel B.
Arguments:
- value: input value
- 0: 100Ω differential termination
- 1: 200Ω differential termination
Raises:
- None
Returns:
None
174 def overrange_clear(self, value) -> None: 175 """A transition from 0 to 2 clears the clears the sticky overrange bit. 176 177 Arguments: 178 value: input value 179 - 0: Normal operation 180 - 2: Overrange bit is cleared 181 182 Raises: 183 None 184 185 Returns: 186 None 187 """ 188 self.samrat.SET_DIG_OVR_CLEAR(value)
A transition from 0 to 2 clears the clears the sticky overrange bit.
Arguments:
- value: input value
- 0: Normal operation
- 2: Overrange bit is cleared
Raises:
- None
Returns:
None
190 def overrange_sticky(self, value: int) -> None: 191 """Makes the digital Overrange sticky. 192 193 Arguments: 194 value: input value 195 - 0: Digital OVR is non-sticky (updated based on overrange_length()) 196 - 1: Digital OVR is sticky (use overrange_clear() to reset) 197 198 Raises: 199 None 200 201 Returns: 202 None 203 """ 204 self.samrat.SET_DIG_OVR_MODE(value)
Makes the digital Overrange sticky.
Arguments:
- value: input value
- 0: Digital OVR is non-sticky (updated based on overrange_length())
- 1: Digital OVR is sticky (use overrange_clear() to reset)
Raises:
- None
Returns:
None
206 def overrange_length(self, value: int) -> None: 207 """Controls the Overrange pulse expansion. The expansion width is specified in terms of number of clock cycles. 208 209 Arguments: 210 value: input value 211 8-bit integer specifying the ovr pulse expansion in number of clock cycles 212 213 Raises: 214 None 215 216 Returns: 217 None 218 """ 219 self.samrat.SET_DIG_OVR_WIDTH(value)
Controls the Overrange pulse expansion. The expansion width is specified in terms of number of clock cycles.
Arguments:
- value: input value 8-bit integer specifying the ovr pulse expansion in number of clock cycles
Raises:
- None
Returns:
None
221 def lvds_termination(self, value: int) -> None: 222 """Configures the LVDS termination resistance 223 224 Arguments: 225 value: input value 226 - 0: LVDS termination is 50Ω 227 - 1: LVDS termination is 100Ω 228 229 Raises: 230 None 231 232 Returns: 233 None 234 """ 235 self.samrat.SET_HUNDRED_OHM_TERM(value)
Configures the LVDS termination resistance
Arguments:
- value: input value
- 0: LVDS termination is 50Ω
- 1: LVDS termination is 100Ω
Raises:
- None
Returns:
None
237 def lvds_half_swing(self, value: int) -> None: 238 """Reduces LVDS output swing by 50% to reduce power consumption 239 240 Arguments: 241 value: input value 242 - 0: Normal output swing 243 - 1: Reduced output swing 244 245 Raises: 246 None 247 248 Returns: 249 None 250 """ 251 self.samrat.SET_LVDS_HALF_SWING_EN(value)
Reduces LVDS output swing by 50% to reduce power consumption
Arguments:
- value: input value
- 0: Normal output swing
- 1: Reduced output swing
Raises:
- None
Returns:
None
253 def data_rate(self, value: int) -> None: 254 """This bit configures the parallel LVDS output interface. When only a single channel is output, SDR LVDS can be enabled. 255 256 Arguments: 257 value: input value 258 - 0: Dual Data Rate (DDR) 259 - 1: Single Data Rate (SDR) 260 261 Raises: 262 None 263 264 Returns: 265 None 266 """ 267 self.samrat.SET_SDR(value)
This bit configures the parallel LVDS output interface. When only a single channel is output, SDR LVDS can be enabled.
Arguments:
- value: input value
- 0: Dual Data Rate (DDR)
- 1: Single Data Rate (SDR)
Raises:
- None
Returns:
None
269 def swap_channels(self, value: int) -> None: 270 """Internally swaps channel A and channel B. 271 272 Arguments: 273 value: input value 274 - 0: Normal operation 275 - 1: Channel A and channel B are swapped 276 277 Raises: 278 None 279 280 Returns: 281 None 282 """ 283 self.samrat.SET_SWAP_CHANNELS(value)
Internally swaps channel A and channel B.
Arguments:
- value: input value
- 0: Normal operation
- 1: Channel A and channel B are swapped
Raises:
- None
Returns:
None
285 def lvds_data_invert(self, value) -> None: 286 """Inverts the polarity of individual LVDS output lanes. 287 288 Arguments: 289 lanes: 290 Value to write to the register, where each bit represents as listed in the datasheet, and the values correspond to the following functions: 291 - 0: Normal operation 292 - 1: LVDS Lane is inverted 293 294 Raises: 295 None 296 297 Returns: 298 None 299 """ 300 self.samrat.SET_LVDS_DATA_INV(value)
Inverts the polarity of individual LVDS output lanes.
Arguments:
- lanes: Value to write to the register, where each bit represents as listed in the datasheet, and the values correspond to the following functions:
- 0: Normal operation
- 1: LVDS Lane is inverted
Raises:
- None
Returns:
None
302 def lvds_powerdown(self, value: List[int]) -> None: 303 """Powers down the individual LVDS output lanes and puts LVDS pins into high impedance state. 304 305 Arguments: 306 value: input value 307 Value to write to the register, where each bit represents as listed in the datasheet, and the values correspond to the following functions: 308 - 0: Normal operation 309 - 1: Powered down 310 311 Raises: 312 None 313 314 Returns: 315 None 316 """ 317 self.samrat.SET_LVDS_DATA_PDN(value)
Powers down the individual LVDS output lanes and puts LVDS pins into high impedance state.
Arguments:
- value: input value
Value to write to the register, where each bit represents as listed in the datasheet, and the values correspond to the following functions:
- 0: Normal operation
- 1: Powered down
Raises:
- None
Returns:
None
319 def fclk_duty_cycle(self, value: int) -> None: 320 """Adjusts the Frame clock duty cycle. 321 Arguments: 322 value: input value 323 - 0: FCLK stays high for one DCLK cycle at the beginning of the output sample 324 - 1: FCLK stays high for 50% of the output sample 325 326 Raises: 327 None 328 329 Returns: 330 None 331 """ 332 self.samrat.SET_ENABLE_50PER_DUTY_FCLK(value)
Adjusts the Frame clock duty cycle.
Arguments:
- value: input value
- 0: FCLK stays high for one DCLK cycle at the beginning of the output sample
- 1: FCLK stays high for 50% of the output sample
Raises:
- None
Returns:
None
334 def fclk_disable(self, value: int) -> None: 335 """Disables the output Frame clock. 336 337 Arguments: 338 value: input value 339 - 0: FCLK replaces the LSB data and is transmitted on DOUT0 340 - 1: FCLK is disabled and the LSB data is transmitted on DOUT0. 341 342 Raises: 343 None 344 345 Returns: 346 None 347 """ 348 self.samrat.SET_DISABLE_FRAME_INSERTION(value)
Disables the output Frame clock.
Arguments:
- value: input value
- 0: FCLK replaces the LSB data and is transmitted on DOUT0
- 1: FCLK is disabled and the LSB data is transmitted on DOUT0.
Raises:
- None
Returns:
None
350 def lvds_mux_enable(self, value: int) -> None: 351 """Enables use of the LVDS output mux 352 353 Arguments: 354 value: input value 355 - 0: LVDS Mux disabled 356 - 1: LVDS Mux enabled 357 358 Raises: 359 None 360 361 Returns: 362 None 363 """ 364 self.samrat.SET_LVDS_CROSS_BAR_MUX_EN(value)
Enables use of the LVDS output mux
Arguments:
- value: input value
- 0: LVDS Mux disabled
- 1: LVDS Mux enabled
Raises:
- None
Returns:
None
366 def lvds_swap_edge(self, value: int) -> None: 367 """Swaps the output data bits transmitted on rising and falling edge of DCLK. 368 369 Arguments: 370 value: input value 371 - 0: Normal operation 372 - 1: Output bits on rising and falling edge are swapped. 373 374 Raises: 375 None 376 377 Returns: 378 None 379 """ 380 self.samrat.SET_LVDS_SWAP_RISE_FALL(value)
Swaps the output data bits transmitted on rising and falling edge of DCLK.
Arguments:
- value: input value
- 0: Normal operation
- 1: Output bits on rising and falling edge are swapped.
Raises:
- None
Returns:
None
382 def lvds_scrambling(self, value: int) -> None: 383 """Controls the scrambling and LSB insertion configuration on the output data 384 385 Arguments: 386 value: input value 387 - 0: No scrambling, Defualt Operation 388 - 1: Data is XOR'ed with a PRBS bit. This PRBS is inserted on the LSB position 389 - 2: OVR is inserted on the LSB position 390 - 3: OVR is inserted on the LSB+1 position 391 - 4: Data is XOR'ed with a PRBS bit, and the PRBS is inserted on LSB+1 position 392 - 5: OVR is inserted on LSB+1 position, PRBS is inseted on LSB position. Data is XOR'ed with PRBS 393 - 6: OVR is inserted on LSB+2 position, PRBS is inseted on LSB+1 position. Data is XOR'ed with PRBS 394 395 Raises: 396 None 397 398 Returns: 399 None 400 """ 401 self.samrat.SET_LVDS_DATA_DITH_MODE(value)
Controls the scrambling and LSB insertion configuration on the output data
Arguments:
- value: input value
- 0: No scrambling, Defualt Operation
- 1: Data is XOR'ed with a PRBS bit. This PRBS is inserted on the LSB position
- 2: OVR is inserted on the LSB position
- 3: OVR is inserted on the LSB+1 position
- 4: Data is XOR'ed with a PRBS bit, and the PRBS is inserted on LSB+1 position
- 5: OVR is inserted on LSB+1 position, PRBS is inseted on LSB position. Data is XOR'ed with PRBS
- 6: OVR is inserted on LSB+2 position, PRBS is inseted on LSB+1 position. Data is XOR'ed with PRBS
Raises:
- None
Returns:
None
403 def dout0_mux(self, data: int) -> None: 404 """Configures the digital data output on LVDS lane 0 405 406 Arguments: 407 data: 408 The internal digital data bus lane that is being mapped 409 410 Raises: 411 None 412 413 Returns: 414 None 415 """ 416 self.samrat.SET_LANE0_MUX_SEL(data)
Configures the digital data output on LVDS lane 0
Arguments:
- data: The internal digital data bus lane that is being mapped
Raises:
- None
Returns:
None
418 def dout1_mux(self, data: int) -> None: 419 """Configures the digital data output on LVDS lane 1 420 421 Arguments: 422 data: 423 The internal digital data bus lane that is being mapped 424 425 Raises: 426 None 427 428 Returns: 429 None 430 """ 431 self.samrat.SET_LANE1_MUX_SEL(data)
Configures the digital data output on LVDS lane 1
Arguments:
- data: The internal digital data bus lane that is being mapped
Raises:
- None
Returns:
None
433 def dout2_mux(self, data: int) -> None: 434 """Configures the digital data output on LVDS lane 2 435 436 Arguments: 437 data: 438 The internal digital data bus lane that is being mapped 439 440 Raises: 441 None 442 443 Returns: 444 None 445 """ 446 self.samrat.SET_LANE2_MUX_SEL(data)
Configures the digital data output on LVDS lane 2
Arguments:
- data: The internal digital data bus lane that is being mapped
Raises:
- None
Returns:
None
448 def dout3_mux(self, data: int) -> None: 449 """Configures the digital data output on LVDS lane 3 450 451 Arguments: 452 data: 453 The internal digital data bus lane that is being mapped 454 455 Raises: 456 None 457 458 Returns: 459 None 460 """ 461 self.samrat.SET_LANE3_MUX_SEL(data)
Configures the digital data output on LVDS lane 3
Arguments:
- data: The internal digital data bus lane that is being mapped
Raises:
- None
Returns:
None
463 def dout4_mux(self, data: int) -> None: 464 """Configures the digital data output on LVDS lane 4 465 466 Arguments: 467 data: 468 The internal digital data bus lane that is being mapped 469 470 Raises: 471 None 472 473 Returns: 474 None 475 """ 476 self.samrat.SET_LANE4_MUX_SEL(data)
Configures the digital data output on LVDS lane 4
Arguments:
- data: The internal digital data bus lane that is being mapped
Raises:
- None
Returns:
None
478 def dout5_mux(self, data: int) -> None: 479 """Configures the digital data output on LVDS lane 5 480 481 Arguments: 482 data: 483 The internal digital data bus lane that is being mapped 484 485 Raises: 486 None 487 488 Returns: 489 None 490 """ 491 self.samrat.SET_LANE5_MUX_SEL(data)
Configures the digital data output on LVDS lane 5
Arguments:
- data: The internal digital data bus lane that is being mapped
Raises:
- None
Returns:
None
493 def dout6_mux(self, data: int) -> None: 494 """Configures the digital data output on LVDS lane 6 495 496 Arguments: 497 data: 498 The internal digital data bus lane that is being mapped 499 500 Raises: 501 None 502 503 Returns: 504 None 505 """ 506 self.samrat.SET_LANE6_MUX_SEL(data)
Configures the digital data output on LVDS lane 6
Arguments:
- data: The internal digital data bus lane that is being mapped
Raises:
- None
Returns:
None
508 def dout7_mux(self, data: int) -> None: 509 """Configures the digital data output on LVDS lane 7 510 511 Arguments: 512 data: 513 The internal digital data bus lane that is being mapped 514 515 Raises: 516 None 517 518 Returns: 519 None 520 """ 521 self.samrat.SET_LANE7_MUX_SEL(data)
Configures the digital data output on LVDS lane 7
Arguments:
- data: The internal digital data bus lane that is being mapped
Raises:
- None
Returns:
None
523 def dout8_mux(self, data: int) -> None: 524 """Configures the digital data output on LVDS lane 8 525 526 Arguments: 527 data: 528 The internal digital data bus lane that is being mapped 529 530 Raises: 531 None 532 533 Returns: 534 None 535 """ 536 self.samrat.SET_LANE8_MUX_SEL(data)
Configures the digital data output on LVDS lane 8
Arguments:
- data: The internal digital data bus lane that is being mapped
Raises:
- None
Returns:
None
538 def dout9_mux(self, data: int) -> None: 539 """Configures the digital data output on LVDS lane 9 540 541 Arguments: 542 data: 543 The internal digital data bus lane that is being mapped 544 545 Raises: 546 None 547 548 Returns: 549 None 550 """ 551 self.samrat.SET_LANE9_MUX_SEL(data)
Configures the digital data output on LVDS lane 9
Arguments:
- data: The internal digital data bus lane that is being mapped
Raises:
- None
Returns:
None
553 def dout10_mux(self, data: int) -> None: 554 """Configures the digital data output on LVDS lane 10 555 556 Arguments: 557 data: 558 The internal digital data bus lane that is being mapped 559 560 Raises: 561 None 562 563 Returns: 564 None 565 """ 566 self.samrat.SET_LANE10_MUX_SEL(data)
Configures the digital data output on LVDS lane 10
Arguments:
- data: The internal digital data bus lane that is being mapped
Raises:
- None
Returns:
None
568 def dout11_mux(self, data: int) -> None: 569 """Configures the digital data output on LVDS lane 11 570 571 Arguments: 572 data: 573 The internal digital data bus lane that is being mapped 574 575 Raises: 576 None 577 578 Returns: 579 None 580 """ 581 self.samrat.SET_LANE11_MUX_SEL(data)
Configures the digital data output on LVDS lane 11
Arguments:
- data: The internal digital data bus lane that is being mapped
Raises:
- None
Returns:
None
583 def dout12_mux(self, data: int) -> None: 584 """Configures the digital data output on LVDS lane 12 585 586 Arguments: 587 data: 588 The internal digital data bus lane that is being mapped 589 590 Raises: 591 None 592 593 Returns: 594 None 595 """ 596 self.samrat.SET_LANE12_MUX_SEL(data)
Configures the digital data output on LVDS lane 12
Arguments:
- data: The internal digital data bus lane that is being mapped
Raises:
- None
Returns:
None
598 def dout13_mux(self, data: int) -> None: 599 """Configures the digital data output on LVDS lane 13 600 601 Arguments: 602 data: 603 The internal digital data bus lane that is being mapped 604 605 Raises: 606 None 607 608 Returns: 609 None 610 """ 611 self.samrat.SET_LANE13_MUX_SEL(data)
Configures the digital data output on LVDS lane 13
Arguments:
- data: The internal digital data bus lane that is being mapped
Raises:
- None
Returns:
None
613 def dout14_mux(self, data: int) -> None: 614 """Configures the digital data output on LVDS lane 14 615 616 Arguments: 617 data: 618 The internal digital data bus lane that is being mapped 619 620 Raises: 621 None 622 623 Returns: 624 None 625 """ 626 self.samrat.SET_LANE14_MUX_SEL(data)
Configures the digital data output on LVDS lane 14
Arguments:
- data: The internal digital data bus lane that is being mapped
Raises:
- None
Returns:
None
628 def dout15_mux(self, data: int) -> None: 629 """Configures the digital data output on LVDS lane 15 630 631 Arguments: 632 data: 633 The internal digital data bus lane that is being mapped 634 635 Raises: 636 None 637 638 Returns: 639 None 640 """ 641 self.samrat.SET_LANE15_MUX_SEL(data)
Configures the digital data output on LVDS lane 15
Arguments:
- data: The internal digital data bus lane that is being mapped
Raises:
- None
Returns:
None
643 def high_fin(self, value: int) -> None: 644 """Enable for best AC performance for input frequencies greater than 500 MHz 645 646 Arguments: 647 value: input value 648 - 0: Normal operation 649 - 1: Performance optimized for input frequencies greater than 500 MHz 650 651 Raises: 652 None 653 654 Returns: 655 None 656 """ 657 self.samrat.SET_DIS_ANA_NL_CORR(value)
Enable for best AC performance for input frequencies greater than 500 MHz
Arguments:
- value: input value
- 0: Normal operation
- 1: Performance optimized for input frequencies greater than 500 MHz
Raises:
- None
Returns:
None
659 def sysref_detect(self) -> int: 660 """Indicates if a SYSREF signal is detected. Upon detection this bit stays high until it gets reset (0x102, D6) or a device reset is issued. 661 662 Arguments: 663 None 664 665 Raises: 666 None 667 668 Returns: 669 Status of the Sysref signal 670 671 - 0: No Sysref signal detected 672 - 1: Sysref signal detected 673 """ 674 return self.samrat.GET_SYSREF_DET()
Indicates if a SYSREF signal is detected. Upon detection this bit stays high until it gets reset (0x102, D6) or a device reset is issued.
Arguments:
- None
Raises:
- None
Returns:
Status of the Sysref signal
- 0: No Sysref signal detected
- 1: Sysref signal detected
676 def sysref_or(self) -> int: 677 """Output of the five SYSREF XOR flags logically OR'ed together 678 679 Arguments: 680 None 681 682 Raises: 683 None 684 685 Returns: 686 Status of the SYSREF flags OR'ed together 687 688 - 0: No sysref flags raised 689 - 1: One of the five XOR flags is raised 690 """ 691 return self.samrat.GET_SYSREF_OR()
Output of the five SYSREF XOR flags logically OR'ed together
Arguments:
- None
Raises:
- None
Returns:
Status of the SYSREF flags OR'ed together
- 0: No sysref flags raised
- 1: One of the five XOR flags is raised
693 def sysref_xor(self) -> int: 694 """XOR flags from the SYSREF window monitoring circuitry. 695 696 The sampling clock falling edge is used to capture the SYSREF signal. 697 If a SYSREF signal transition happens within -60/+140 ps of the SYSREF capture, the appropriate XOR flag gets raised. 698 These bits are updated on every SYSREF rising edge. 699 700 Arguments: 701 None 702 703 Raises: 704 None 705 706 Returns: 707 List of 5 flags as follows 708 709 - X0: SYSREF leading sample clock by 20 to 60ps 710 - X1: SYSREF leading sample clock by 20ps to 0ps or SYSREF lagging sample clock by 0 to 20ps 711 - X2: SYSREF lagging sample clock by up to 20 to 60ps 712 - X3: SYSREF lagging sample clock by 60 to 100ps 713 - X4: SYSREF lagging sample clock by 100 to 140ps 714 715 With the corresponding values: 716 - 0: Flag not raised 717 - 1: Flag raised 718 """ 719 return self.samrat.GET_SYSREF_XOR()
XOR flags from the SYSREF window monitoring circuitry.
The sampling clock falling edge is used to capture the SYSREF signal. If a SYSREF signal transition happens within -60/+140 ps of the SYSREF capture, the appropriate XOR flag gets raised. These bits are updated on every SYSREF rising edge.
Arguments:
- None
Raises:
- None
Returns:
List of 5 flags as follows
- X0: SYSREF leading sample clock by 20 to 60ps
- X1: SYSREF leading sample clock by 20ps to 0ps or SYSREF lagging sample clock by 0 to 20ps
- X2: SYSREF lagging sample clock by up to 20 to 60ps
- X3: SYSREF lagging sample clock by 60 to 100ps
- X4: SYSREF lagging sample clock by 100 to 140ps
With the corresponding values:
- 0: Flag not raised
- 1: Flag raised
721 def gpio_config(self, value: int) -> None: 722 """Configures the functionaliy of the two GPIO pins 723 724 Arguments: 725 value: input value 726 727 | Value | GPIO 1 | GPIO 0 | 728 |:------:|:-------------------:|:-------------------:| 729 | 0 | NOT USED | SYSREF | 730 | 3 | GLOBAL POWER DOWN | SYSREF | 731 | 4 | EXTERNAL REFERENCE | SYSREF | 732 | 5 | NCO SWITCH 1 | NCO SWITCH 0 | 733 | 8 | NOT USED | SYSREF | 734 | 9 | OVR CHB/CHA | SYSREF | 735 | 10 | NOT USED | GLOBAL POWER DOWN | 736 | 11 | OVR CHB/CHA | GLOBAL POWER DOWN | 737 | 12 | OVR CHB | OVR CHA | 738 739 Raises: 740 None 741 742 Returns: 743 None 744 """ 745 self.samrat.SET_GPIO_CONFIG(value)
Configures the functionaliy of the two GPIO pins
Arguments:
- value: input value
| Value | GPIO 1 | GPIO 0 |
|---|---|---|
| 0 | NOT USED | SYSREF |
| 3 | GLOBAL POWER DOWN | SYSREF |
| 4 | EXTERNAL REFERENCE | SYSREF |
| 5 | NCO SWITCH 1 | NCO SWITCH 0 |
| 8 | NOT USED | SYSREF |
| 9 | OVR CHB/CHA | SYSREF |
| 10 | NOT USED | GLOBAL POWER DOWN |
| 11 | OVR CHB/CHA | GLOBAL POWER DOWN |
| 12 | OVR CHB | OVR CHA |
Raises:
- None
Returns:
None
747 def pattern_clk(self, value: int) -> None: 748 """Controls the clock of the pattern signal generator. 749 750 Arguments: 751 value: input value 752 - 0: Normal operation 753 - 1: Decimation CLK is used for the pattern generator 754 755 Raises: 756 None 757 758 Returns: 759 None 760 """ 761 self.samrat.SET_PATTERN_CLK(value)
Controls the clock of the pattern signal generator.
Arguments:
- value: input value
- 0: Normal operation
- 1: Decimation CLK is used for the pattern generator
Raises:
- None
Returns:
None
763 def test_pattern(self, value: int) -> None: 764 """Controls the type of test pattern. 765 766 The generated pattern is 20 bits wide. In 16 bit resolution mode, 16 MSBs of the pattern mode are sent out. 767 In 32 bit resolution mode, 12 zeros are padded to the generated pattern and sent out. 768 769 Arguments: 770 value: input value 771 - 0: Test pattern is disabled 772 - 1: Ramp pattern with a step of 1 (at 20 bit level, which is equivalent to 1/16 at 16 bit level) 773 - 2: Ramp pattern with a step value set by CUSTOM PATTERN. 774 - 3: Not used 775 - 4: Static pattern set by CUSTOM PATTERN 776 - 5: Pattern toggles between CUSTOM PATTERN and invert of CUSTOM PATTERN 777 - 6: Pattern toggles between CUSTOM PATTERN and 0 778 779 Raises: 780 None 781 782 Returns: 783 None 784 """ 785 self.samrat.SET_TEST_PATTERN_MODE(value)
Controls the type of test pattern.
The generated pattern is 20 bits wide. In 16 bit resolution mode, 16 MSBs of the pattern mode are sent out. In 32 bit resolution mode, 12 zeros are padded to the generated pattern and sent out.
Arguments:
- value: input value
- 0: Test pattern is disabled
- 1: Ramp pattern with a step of 1 (at 20 bit level, which is equivalent to 1/16 at 16 bit level)
- 2: Ramp pattern with a step value set by CUSTOM PATTERN.
- 3: Not used
- 4: Static pattern set by CUSTOM PATTERN
- 5: Pattern toggles between CUSTOM PATTERN and invert of CUSTOM PATTERN
- 6: Pattern toggles between CUSTOM PATTERN and 0
Raises:
- None
Returns:
None
787 def custom_pattern(self, value: int) -> None: 788 """Controls the pattern generator. This controls different functions depending on the TEST PATTERN setting 789 790 Arguments: 791 value: 792 20-bit custom pattern data 793 794 Raises: 795 None 796 797 Returns: 798 None 799 """ 800 # if value != 0: 801 # if not ((int(log(value, 2)) + 1) <= 20): 802 # raise Exception("Custom pattern value must be 20 bits long or less") 803 self.samrat.SET_CUSTOM_PATTERN(value)
Controls the pattern generator. This controls different functions depending on the TEST PATTERN setting
Arguments:
- value: 20-bit custom pattern data
Raises:
- None
Returns:
None
805 def digital_gain_cha(self, value: int) -> None: 806 """Controls digital gain for channel A. Maximum gain is 6dB. 807 808 Arguments: 809 value: 810 Desired value to write into the register, where: 811 Gain = (20 x log(1+(Value / 128))) 812 813 Raises: 814 None 815 816 Returns: 817 None 818 """ 819 self.samrat.SET_CH0_PROG_GAIN(value)
Controls digital gain for channel A. Maximum gain is 6dB.
Arguments:
- value: Desired value to write into the register, where: Gain = (20 x log(1+(Value / 128)))
Raises:
- None
Returns:
None
821 def digital_gain_chb(self, value: int) -> None: 822 """Controls digital gain for channel B. Maximum gain is 6dB. 823 824 Arguments: 825 value: 826 Desired value to write into the register, where: 827 Gain = (20 x log(1+(Value / 128))) 828 829 Raises: 830 None 831 832 Returns: 833 None 834 """ 835 self.samrat.SET_CH1_PROG_GAIN(value)
Controls digital gain for channel B. Maximum gain is 6dB.
Arguments:
- value: Desired value to write into the register, where: Gain = (20 x log(1+(Value / 128)))
Raises:
- None
Returns:
None
837 def sysref_mode(self, value: int) -> None: 838 """Controls the global SYSREF mask 839 840 Arguments: 841 value: input value 842 - 0: Pass all SYSREF pulses 843 - 1: Pass the first SYSREF pulse and gates subsequent pulses 844 - 2: Gate all SYSREF pulses 845 - 3: Issue new SYSREF pulse. The pulse is issued when the state transitions to 11 846 847 Raises: 848 None 849 850 Returns: 851 None 852 """ 853 self.samrat.SET_SYSREF_MODE(value)
Controls the global SYSREF mask
Arguments:
- value: input value
- 0: Pass all SYSREF pulses
- 1: Pass the first SYSREF pulse and gates subsequent pulses
- 2: Gate all SYSREF pulses
- 3: Issue new SYSREF pulse. The pulse is issued when the state transitions to 11
Raises:
- None
Returns:
None
855 def lvds_sysref_mask(self, value: int) -> None: 856 """Controls the SYSREF pulse going to the LVDS block. 857 858 Arguments: 859 value: input value 860 - 0: Pass all SYSREF pulses 861 - 1: Pass the first SYSREF pulse and gates subsequent pulses 862 - 2: Gate all SYSREF pulses 863 - 3: Issue new SYSREF pulse. The pulse is issued when the state transitions to 11 864 865 Raises: 866 None 867 868 Returns: 869 None 870 """ 871 self.samrat.SET_LVDS_SYSREF_MASK(value)
Controls the SYSREF pulse going to the LVDS block.
Arguments:
- value: input value
- 0: Pass all SYSREF pulses
- 1: Pass the first SYSREF pulse and gates subsequent pulses
- 2: Gate all SYSREF pulses
- 3: Issue new SYSREF pulse. The pulse is issued when the state transitions to 11
Raises:
- None
Returns:
None
873 def ddc_sysref_mask(self, value: int) -> None: 874 """Controls the SYSREF pulse of DDC block. 875 876 Arguments: 877 value: input value 878 - 0: Pass all SYSREF pulses 879 - 1: Pass the first SYSREF pulse and gates subsequent pulses 880 - 2: Gate all SYSREF pulses 881 - 3: Issue new SYSREF pulse. The pulse is issued when the state transitions to 11 882 883 Raises: 884 None 885 886 Returns: 887 None 888 """ 889 self.samrat.SET_DECIMATION_SYSREF_MASK(value)
Controls the SYSREF pulse of DDC block.
Arguments:
- value: input value
- 0: Pass all SYSREF pulses
- 1: Pass the first SYSREF pulse and gates subsequent pulses
- 2: Gate all SYSREF pulses
- 3: Issue new SYSREF pulse. The pulse is issued when the state transitions to 11
Raises:
- None
Returns:
None
891 def nco_sysref_mask(self, value: int) -> None: 892 """Controls the SYSREF pulse of NCO block. 893 894 Arguments: 895 value: input value 896 - 0: Pass all SYSREF pulses 897 - 1: Pass the first SYSREF pulse and gates subsequent pulses 898 - 2: Gate all SYSREF pulses 899 - 3: Issue new SYSREF pulse. The pulse is issued when the state transitions to 11 900 901 Raises: 902 None 903 904 Returns: 905 None 906 """ 907 self.samrat.SET_NCO_SYSREF_MASK(value)
Controls the SYSREF pulse of NCO block.
Arguments:
- value: input value
- 0: Pass all SYSREF pulses
- 1: Pass the first SYSREF pulse and gates subsequent pulses
- 2: Gate all SYSREF pulses
- 3: Issue new SYSREF pulse. The pulse is issued when the state transitions to 11
Raises:
- None
Returns:
None
909 def timer_sysref_mask(self, value: int) -> None: 910 """Controls the SYSREF pulse of TIMER block. 911 912 Arguments: 913 value: input value 914 - 0: Pass all SYSREF pulses 915 - 1: Pass the first SYSREF pulse and gates subsequent pulses 916 - 2: Gate all SYSREF pulses 917 - 3: Issue new SYSREF pulse. The pulse is issued when the state transitions to 11 918 919 Raises: 920 None 921 922 Returns: 923 None 924 """ 925 self.samrat.SET_TIMER_SYSREF_MASK(value)
Controls the SYSREF pulse of TIMER block.
Arguments:
- value: input value
- 0: Pass all SYSREF pulses
- 1: Pass the first SYSREF pulse and gates subsequent pulses
- 2: Gate all SYSREF pulses
- 3: Issue new SYSREF pulse. The pulse is issued when the state transitions to 11
Raises:
- None
Returns:
None
927 def sysref_time_stamp(self, value: int) -> None: 928 """Allows the SYSREF to be passed on the FRAME_INDICATOR lane. OVR_ON_LSB setting takes precedence 929 930 Arguments: 931 value: input value 932 - 0: Normal operation 933 - 3: Pass sysref time stamp on the frame indicator lane 934 935 Raises: 936 None 937 938 Returns: 939 None 940 """ 941 self.samrat.SET_SYSREF_TIME_STAMP(value)
Allows the SYSREF to be passed on the FRAME_INDICATOR lane. OVR_ON_LSB setting takes precedence
Arguments:
- value: input value
- 0: Normal operation
- 3: Pass sysref time stamp on the frame indicator lane
Raises:
- None
Returns:
None
943 def gain_override(self, value: int) -> None: 944 """Controls 6dB gain setting of the DDC. The 6dB gain is applied in COMPLEX DDC mode by default. This will force 6 dB gain on the DDC output, irrespective of the DDC mode 945 946 Arguments: 947 value: input value 948 - 0: Normal operation 949 - 2: Unity gain 950 - 3: 6dB gain override 951 952 Raises: 953 None 954 955 Returns: 956 None 957 """ 958 self.samrat.SET_SIX_DB_GAIN_OVERRIDE(value)
Controls 6dB gain setting of the DDC. The 6dB gain is applied in COMPLEX DDC mode by default. This will force 6 dB gain on the DDC output, irrespective of the DDC mode
Arguments:
- value: input value
- 0: Normal operation
- 2: Unity gain
- 3: 6dB gain override
Raises:
- None
Returns:
None
960 def complex_decimation(self, value: int) -> None: 961 """Enables/disables complex decimation for all DDCs. 962 963 Arguments: 964 value: input value 965 - 0: Real Deciamtion 966 - 1: Complex Decimation 967 968 Raises: 969 None 970 971 Returns: 972 None 973 """ 974 self.samrat.SET_EN_COMPLEX_DDC(value)
Enables/disables complex decimation for all DDCs.
Arguments:
- value: input value
- 0: Real Deciamtion
- 1: Complex Decimation
Raises:
- None
Returns:
None
976 def output_resolution(self, value: int) -> None: 977 """Configures the output resolution for 16-bit or 32-bit 978 979 Arguments: 980 value: input value 981 - 0: 16-bit output resolution 982 - 1: 32-bit output resolution 983 984 Raises: 985 None 986 987 Returns: 988 None 989 """ 990 self.samrat.SET_OUTPUT_RESOLUTION(value)
Configures the output resolution for 16-bit or 32-bit
Arguments:
- value: input value
- 0: 16-bit output resolution
- 1: 32-bit output resolution
Raises:
- None
Returns:
None
992 def output_format(self, value: int) -> None: 993 """Configures the output data format 994 995 Arguments: 996 value: input value 997 - 0: Output format is 2s complement 998 - 1: Output format is offset binary 999 1000 Raises: 1001 None 1002 1003 Returns: 1004 None 1005 """ 1006 self.samrat.SET_OUTPUT_FORMAT(value)
Configures the output data format
Arguments:
- value: input value
- 0: Output format is 2s complement
- 1: Output format is offset binary
Raises:
- None
Returns:
None
1008 def ddc0_mux(self, input: int) -> None: 1009 """Sets the input data source to decimation filter 0. 1010 1011 Arguments: 1012 ddc: 1013 The DDC for which the input data source is being configured 1014 input: 1015 Input to the DDC 1016 - 0: Channel A 1017 - 1: Channel B 1018 - 2: 2x Average ((ChA + ChB)/2) 1019 - 3: 2x Average ((ChA - ChB)/2) 1020 1021 Raises: 1022 None 1023 1024 Returns: 1025 None 1026 """ 1027 self.samrat.SET_DDC0_MUX(input)
Sets the input data source to decimation filter 0.
Arguments:
- ddc: The DDC for which the input data source is being configured
- input: Input to the DDC
- 0: Channel A
- 1: Channel B
- 2: 2x Average ((ChA + ChB)/2)
- 3: 2x Average ((ChA - ChB)/2)
Raises:
- None
Returns:
None
1029 def ddc1_mux(self, input: int) -> None: 1030 """Sets the input data source to decimation filter 1. 1031 1032 Arguments: 1033 ddc: 1034 The DDC for which the input data source is being configured 1035 input: 1036 Input to the DDC 1037 - 0: Channel B 1038 - 1: Channel A 1039 - 2: 2x Average ((ChA + ChB)/2) 1040 - 3: 2x Average ((ChA - ChB)/2) 1041 1042 Raises: 1043 None 1044 1045 Returns: 1046 None 1047 """ 1048 self.samrat.SET_DDC1_MUX(input)
Sets the input data source to decimation filter 1.
Arguments:
- ddc: The DDC for which the input data source is being configured
- input: Input to the DDC
- 0: Channel B
- 1: Channel A
- 2: 2x Average ((ChA + ChB)/2)
- 3: 2x Average ((ChA - ChB)/2)
Raises:
- None
Returns:
None
1050 def ddc2_mux(self, input: int) -> None: 1051 """Sets the input data source to decimation filter 2. 1052 1053 Arguments: 1054 ddc: 1055 The DDC for which the input data source is being configured 1056 input: 1057 Input to the DDC 1058 - 0: Channel A 1059 - 1: Channel B 1060 - 2: 2x Average ((ChA + ChB)/2) 1061 - 3: 2x Average ((ChA - ChB)/2) 1062 1063 Raises: 1064 None 1065 1066 Returns: 1067 None 1068 """ 1069 self.samrat.SET_DDC2_MUX(input)
Sets the input data source to decimation filter 2.
Arguments:
- ddc: The DDC for which the input data source is being configured
- input: Input to the DDC
- 0: Channel A
- 1: Channel B
- 2: 2x Average ((ChA + ChB)/2)
- 3: 2x Average ((ChA - ChB)/2)
Raises:
- None
Returns:
None
1071 def ddc3_mux(self, input: int) -> None: 1072 """Sets the input data source to decimation filter 3. 1073 1074 Arguments: 1075 ddc: 1076 The DDC for which the input data source is being configured 1077 input: 1078 Input to the DDC 1079 - 0: Channel B 1080 - 1: Channel A 1081 - 2: 2x Average ((ChA + ChB)/2) 1082 - 3: 2x Average ((ChA - ChB)/2) 1083 1084 Raises: 1085 None 1086 1087 Returns: 1088 None 1089 """ 1090 self.samrat.SET_DDC3_MUX(input)
Sets the input data source to decimation filter 3.
Arguments:
- ddc: The DDC for which the input data source is being configured
- input: Input to the DDC
- 0: Channel B
- 1: Channel A
- 2: 2x Average ((ChA + ChB)/2)
- 3: 2x Average ((ChA - ChB)/2)
Raises:
- None
Returns:
None
1092 def nco0_update(self, value: int) -> None: 1093 """Updates the four NCO frequencies of NCO0. 1094 1095 Arguments: 1096 value: input value 1097 - 0: Normal operation 1098 - 1: Update NCO0 frequencies 1099 1100 Raises: 1101 None 1102 1103 Returns: 1104 None 1105 """ 1106 self.samrat.SET_NCO0_UPDATE(value)
Updates the four NCO frequencies of NCO0.
Arguments:
- value: input value
- 0: Normal operation
- 1: Update NCO0 frequencies
Raises:
- None
Returns:
None
1108 def nco1_update(self, value: int) -> None: 1109 """Updates the four NCO frequencies of NCO1. 1110 1111 Arguments: 1112 value: input value 1113 - 0: Normal operation 1114 - 1: Update NCO1 frequencies 1115 1116 Raises: 1117 None 1118 1119 Returns: 1120 None 1121 """ 1122 self.samrat.SET_NCO1_UPDATE(value)
Updates the four NCO frequencies of NCO1.
Arguments:
- value: input value
- 0: Normal operation
- 1: Update NCO1 frequencies
Raises:
- None
Returns:
None
1124 def nco2_update(self, value: int) -> None: 1125 """Updates the four NCO frequencies of NCO2. 1126 1127 Arguments: 1128 value: input value 1129 - 0: Normal operation 1130 - 1: Update NCO2 frequencies 1131 1132 Raises: 1133 None 1134 1135 Returns: 1136 None 1137 """ 1138 self.samrat.SET_NCO2_UPDATE(value)
Updates the four NCO frequencies of NCO2.
Arguments:
- value: input value
- 0: Normal operation
- 1: Update NCO2 frequencies
Raises:
- None
Returns:
None
1140 def nco3_update(self, value: int) -> None: 1141 """Updates the four NCO frequencies of NCO3. 1142 1143 Arguments: 1144 value: input value 1145 - 0: Normal operation 1146 - 1: Update NCO3 frequencies 1147 1148 Raises: 1149 None 1150 1151 Returns: 1152 None 1153 """ 1154 self.samrat.SET_NCO3_UPDATE(value)
Updates the four NCO frequencies of NCO3.
Arguments:
- value: input value
- 0: Normal operation
- 1: Update NCO3 frequencies
Raises:
- None
Returns:
None
1156 def select_negative_image(self, value: int) -> None: 1157 """Controls the selection of the negative frequency image. Applicable only in Complex DDC mode. 1158 1159 Arguments: 1160 value: input value 1161 - 0: Normal operation 1162 - 1: Negative image 1163 1164 Raises: 1165 None 1166 1167 Returns: 1168 None 1169 """ 1170 self.samrat.SET_NCO_SEL_NEG_IMAGE(value)
Controls the selection of the negative frequency image. Applicable only in Complex DDC mode.
Arguments:
- value: input value
- 0: Normal operation
- 1: Negative image
Raises:
- None
Returns:
None
1172 def nco_mode(self, value: int) -> None: 1173 """Configures the NCOs operating mode. 1174 1175 Arguments: 1176 value: input value 1177 - 0: Phase continuous 1178 - 1: Infinite phase coherent 1179 1180 Raises: 1181 None 1182 1183 Returns: 1184 None 1185 """ 1186 self.samrat.SET_NCO_MODE(value)
Configures the NCOs operating mode.
Arguments:
- value: input value
- 0: Phase continuous
- 1: Infinite phase coherent
Raises:
- None
Returns:
None
1188 def low_latency_enable(self, value: int) -> None: 1189 """Enables low latency mode by byapssing all digital features 1190 1191 Arguments: 1192 value: input value 1193 - 0: Normal Operation 1194 - 1: Low Latency Mode 1195 1196 Raises: 1197 None 1198 1199 Returns: 1200 None 1201 """ 1202 self.samrat.SET_ENABLE_LOW_LATENCY(value)
Enables low latency mode by byapssing all digital features
Arguments:
- value: input value
- 0: Normal Operation
- 1: Low Latency Mode
Raises:
- None
Returns:
None
1204 def disable_nco_auto_update(self, value: int) -> None: 1205 """Disables the automatic update when switching the NCOs using GPIO pins 1206 1207 Arguments: 1208 value: input value 1209 - 0: Automatic update enabled 1210 - 1: Automatic update disabled 1211 1212 Raises: 1213 None 1214 1215 Returns: 1216 None 1217 """ 1218 self.samrat.SET_DISABLE_NCO_AUTO_UPDATE(value)
Disables the automatic update when switching the NCOs using GPIO pins
Arguments:
- value: input value
- 0: Automatic update enabled
- 1: Automatic update disabled
Raises:
- None
Returns:
None
1220 def nco_select_enable(self, value: int) -> None: 1221 """This bit enables NCO frequency selection via SPI register 0x166 instead of GPIO pins. 1222 1223 Arguments: 1224 value: input value 1225 - 0: NCO Select via GPIO Pins 1226 - 1: NCO Select via SPI Write 1227 1228 Raises: 1229 None 1230 1231 Returns: 1232 None 1233 """ 1234 self.samrat.SET_ENABLE_NCO_SEL(value)
This bit enables NCO frequency selection via SPI register 0x166 instead of GPIO pins.
Arguments:
- value: input value
- 0: NCO Select via GPIO Pins
- 1: NCO Select via SPI Write
Raises:
- None
Returns:
None
1236 def nco_common_update(self, value: int) -> None: 1237 """Updates the four NCO frequencies of all NCOs. 1238 1239 Arguments: 1240 value: input value 1241 - 0: Normal operation 1242 - 1: Update NCO frequencies 1243 1244 Raises: 1245 None 1246 1247 Returns: 1248 None 1249 """ 1250 self.samrat.SET_NCO_COMMON_UPDATE(value)
Updates the four NCO frequencies of all NCOs.
Arguments:
- value: input value
- 0: Normal operation
- 1: Update NCO frequencies
Raises:
- None
Returns:
None
1252 def ddc0_nco_select(self, nco: int) -> None: 1253 """Selects which of the 4 frequencies is active for DDC0. 1254 1255 Arguments: 1256 nco: 1257 NCO word to set as the active frequency 1258 1259 Raises: 1260 None 1261 1262 Returns: 1263 None 1264 """ 1265 self.samrat.SET_DDC0_NCO_SEL(nco)
Selects which of the 4 frequencies is active for DDC0.
Arguments:
- nco: NCO word to set as the active frequency
Raises:
- None
Returns:
None
1267 def ddc1_nco_select(self, nco: int) -> None: 1268 """Selects which of the 4 frequencies is active for DDC1. 1269 1270 Arguments: 1271 nco: 1272 NCO word to set as the active frequency 1273 1274 Raises: 1275 None 1276 1277 Returns: 1278 None 1279 """ 1280 self.samrat.SET_DDC1_NCO_SEL(nco)
Selects which of the 4 frequencies is active for DDC1.
Arguments:
- nco: NCO word to set as the active frequency
Raises:
- None
Returns:
None
1282 def ddc2_nco_select(self, nco: int) -> None: 1283 """Selects which of the 4 frequencies is active for DDC2. 1284 1285 Arguments: 1286 nco: 1287 NCO word to set as the active frequency 1288 1289 Raises: 1290 None 1291 1292 Returns: 1293 None 1294 """ 1295 self.samrat.SET_DDC2_NCO_SEL(nco)
Selects which of the 4 frequencies is active for DDC2.
Arguments:
- nco: NCO word to set as the active frequency
Raises:
- None
Returns:
None
1297 def ddc3_nco_select(self, nco: int) -> None: 1298 """Selects which of the 4 frequencies is active for DDC3. 1299 1300 Arguments: 1301 nco: 1302 NCO word to set as the active frequency 1303 1304 Raises: 1305 None 1306 1307 Returns: 1308 None 1309 """ 1310 self.samrat.SET_DDC3_NCO_SEL(nco)
Selects which of the 4 frequencies is active for DDC3.
Arguments:
- nco: NCO word to set as the active frequency
Raises:
- None
Returns:
None
1312 def ddc0_decimation(self, value: int) -> None: 1313 """Sets the decimation filter factors for DDC0 when using unequal decimation factors. 1314 1315 Arguments: 1316 value: 1317 value to write to the register such that Decimation Factor = 2^value. 1318 1319 Raises: 1320 None 1321 1322 Returns: 1323 None 1324 """ 1325 self.samrat.SET_DDC0_DECIMATION_MODE(value)
Sets the decimation filter factors for DDC0 when using unequal decimation factors.
Arguments:
- value: value to write to the register such that Decimation Factor = 2^value.
Raises:
- None
Returns:
None
1327 def ddc1_decimation(self, value: int) -> None: 1328 """Sets the decimation filter factors for DDC1 when using unequal decimation factors. 1329 1330 Arguments: 1331 value: 1332 value to write to the register such that Decimation Factor = 2^value. 1333 1334 Raises: 1335 None 1336 1337 Returns: 1338 None 1339 """ 1340 self.samrat.SET_DDC1_DECIMATION_MODE(value)
Sets the decimation filter factors for DDC1 when using unequal decimation factors.
Arguments:
- value: value to write to the register such that Decimation Factor = 2^value.
Raises:
- None
Returns:
None
1342 def ddc2_decimation(self, value: int) -> None: 1343 """Sets the decimation filter factors for DDC2 when using unequal decimation factors. 1344 1345 Arguments: 1346 value: 1347 value to write to the register such that Decimation Factor = 2^value. 1348 1349 Raises: 1350 None 1351 1352 Returns: 1353 None 1354 """ 1355 self.samrat.SET_DDC2_DECIMATION_MODE(value)
Sets the decimation filter factors for DDC2 when using unequal decimation factors.
Arguments:
- value: value to write to the register such that Decimation Factor = 2^value.
Raises:
- None
Returns:
None
1357 def ddc3_decimation(self, value: int) -> None: 1358 """Sets the decimation filter factors for DDC3 when using unequal decimation factors. 1359 1360 Arguments: 1361 value: 1362 value to write to the register such that Decimation Factor = 2^value. 1363 1364 Raises: 1365 None 1366 1367 Returns: 1368 None 1369 """ 1370 self.samrat.SET_DDC3_DECIMATION_MODE(value)
Sets the decimation filter factors for DDC3 when using unequal decimation factors.
Arguments:
- value: value to write to the register such that Decimation Factor = 2^value.
Raises:
- None
Returns:
None
1372 def unequal_decimation(self, value: int) -> None: 1373 """Enables configuration of DDC0 thru DDC3 to have unequal decimation factors. 1374 1375 Arguments: 1376 value: input value 1377 - 0: Normal operation 1378 - 1: Unequal decimation factors enabled 1379 1380 Raises: 1381 None: 1382 1383 Returns: 1384 None 1385 """ 1386 self.samrat.SET_SELECT_INDEPENDENT_DECIMATION(value)
Enables configuration of DDC0 thru DDC3 to have unequal decimation factors.
Arguments:
- value: input value
- 0: Normal operation
- 1: Unequal decimation factors enabled
Raises:
- None:
Returns:
None
1388 def number_of_ddcs(self, value: int) -> None: 1389 """This register configures the # of active DDCs. 1390 1391 Arguments: 1392 value: input value 1393 - 0: Single DDC per channel (Total two DDCs are enabled) 1394 - 1: Dual DDCs per channel (Total 4 DDCs are enabled) 1395 - 2: Just one DDC is enabled (1 DDC is active) 1396 - 3: Dual DDC for a single channel (Total two DDCs are enabled) 1397 1398 Raises: 1399 None 1400 1401 Returns: 1402 None 1403 """ 1404 lsb = value & 1 1405 msb = value >> 1 1406 self.samrat.SET_EN_DUAL_BAND(lsb) 1407 self.samrat.SET_DIS_DUAL_CHANNEL(msb)
This register configures the # of active DDCs.
Arguments:
- value: input value
- 0: Single DDC per channel (Total two DDCs are enabled)
- 1: Dual DDCs per channel (Total 4 DDCs are enabled)
- 2: Just one DDC is enabled (1 DDC is active)
- 3: Dual DDC for a single channel (Total two DDCs are enabled)
Raises:
- None
Returns:
None
1409 def common_decimation(self, value: int) -> None: 1410 """Sets the decimation filter factor for all active DDCs. 1411 1412 Arguments: 1413 value: 1414 value to write to the register such that Decimation Factor = 2^value. 1415 1416 Raises: 1417 None 1418 1419 Returns: 1420 None 1421 """ 1422 self.samrat.SET_COMMON_DECIMATION_MODE(value)
Sets the decimation filter factor for all active DDCs.
Arguments:
- value: value to write to the register such that Decimation Factor = 2^value.
Raises:
- None
Returns:
None
1424 def update_nyqusit_zone(self, value: int) -> None: 1425 """Must be pulsed after the Nyquist zone if programmed. 1426 1427 A 0 to 1 transition on this bit copies the NYQUIST ZONE field to an internal register. 1428 1429 Argument: 1430 value: input value 1431 - 0: Normal Operation 1432 - 1: Nyquist zone value is updated 1433 1434 Raises: 1435 None 1436 1437 Returns: 1438 None 1439 """ 1440 self.samrat.SET_UPDATE_NYQUIST(value)
Must be pulsed after the Nyquist zone if programmed.
A 0 to 1 transition on this bit copies the NYQUIST ZONE field to an internal register.
Argument:
value: input value - 0: Normal Operation - 1: Nyquist zone value is updated
Raises:
- None
Returns:
None
1442 def nyquist_zone(self, value: int) -> None: 1443 """Sets the nyquist zone of operation. 1444 1445 The internal calibration of the device depends on the NYQUIST ZONE of the signal being sampled. 1446 This field must be programmed based on the operating Nyquist zone. 1447 1448 Arguments: 1449 value: 1450 Operating nyquist zone (0 - 7) 1451 1452 Raises: 1453 None 1454 1455 Returns: 1456 None 1457 """ 1458 self.samrat.SET_NYQUIST_ZONE(value)
Sets the nyquist zone of operation.
The internal calibration of the device depends on the NYQUIST ZONE of the signal being sampled. This field must be programmed based on the operating Nyquist zone.
Arguments:
- value: Operating nyquist zone (0 - 7)
Raises:
- None
Returns:
None
1460 def ddc0_nco_frequency0(self, value: int) -> None: 1461 """Configures the 48-bit NCO frequency word 0 of DDC0. 1462 1463 Arguments: 1464 value: 1465 Value to write to the NCO frequency word, such that:\n 1466 When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS\n 1467 When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS 1468 1469 Raises: 1470 None 1471 1472 Returns: 1473 None 1474 """ 1475 self.samrat.SET_DDC0_NCO_FREQ0(value)
Configures the 48-bit NCO frequency word 0 of DDC0.
Arguments:
value: Value to write to the NCO frequency word, such that:
When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS
When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS
Raises:
- None
Returns:
None
1477 def ddc0_nco_frequency1(self, value: int) -> None: 1478 """Configures the 48-bit NCO frequency word 1 of DDC0. 1479 1480 Arguments: 1481 value: 1482 Value to write to the NCO frequency word, such that:\n 1483 When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS\n 1484 When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS 1485 1486 Raises: 1487 None 1488 1489 Returns: 1490 None 1491 """ 1492 self.samrat.SET_DDC0_NCO_FREQ1(value)
Configures the 48-bit NCO frequency word 1 of DDC0.
Arguments:
value: Value to write to the NCO frequency word, such that:
When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS
When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS
Raises:
- None
Returns:
None
1494 def ddc0_nco_frequency2(self, value: int) -> None: 1495 """Configures the 48-bit NCO frequency word 2 of DDC0. 1496 1497 Arguments: 1498 value: 1499 Value to write to the NCO frequency word, such that:\n 1500 When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS\n 1501 When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS 1502 1503 Raises: 1504 None 1505 1506 Returns: 1507 None 1508 """ 1509 self.samrat.SET_DDC0_NCO_FREQ2(value)
Configures the 48-bit NCO frequency word 2 of DDC0.
Arguments:
value: Value to write to the NCO frequency word, such that:
When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS
When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS
Raises:
- None
Returns:
None
1511 def ddc0_nco_frequency3(self, value: int) -> None: 1512 """Configures the 48-bit NCO frequency word 3 of DDC0. 1513 1514 Arguments: 1515 value: 1516 Value to write to the NCO frequency word, such that:\n 1517 When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS\n 1518 When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS 1519 1520 Raises: 1521 None 1522 1523 Returns: 1524 None 1525 """ 1526 self.samrat.SET_DDC0_NCO_FREQ3(value)
Configures the 48-bit NCO frequency word 3 of DDC0.
Arguments:
value: Value to write to the NCO frequency word, such that:
When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS
When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS
Raises:
- None
Returns:
None
1528 def ddc1_nco_frequency0(self, value: int) -> None: 1529 """Configures the 48-bit NCO frequency word 0 of DDC1. 1530 1531 Arguments: 1532 value: 1533 Value to write to the NCO frequency word, such that:\n 1534 When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS\n 1535 When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS 1536 1537 Raises: 1538 None 1539 1540 Returns: 1541 None 1542 """ 1543 self.samrat.SET_DDC1_NCO_FREQ0(value)
Configures the 48-bit NCO frequency word 0 of DDC1.
Arguments:
value: Value to write to the NCO frequency word, such that:
When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS
When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS
Raises:
- None
Returns:
None
1545 def ddc1_nco_frequency1(self, value: int) -> None: 1546 """Configures the 48-bit NCO frequency word 1 of DDC1. 1547 1548 Arguments: 1549 value: 1550 Value to write to the NCO frequency word, such that:\n 1551 When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS\n 1552 When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS 1553 1554 Raises: 1555 None 1556 1557 Returns: 1558 None 1559 """ 1560 self.samrat.SET_DDC1_NCO_FREQ1(value)
Configures the 48-bit NCO frequency word 1 of DDC1.
Arguments:
value: Value to write to the NCO frequency word, such that:
When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS
When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS
Raises:
- None
Returns:
None
1562 def ddc1_nco_frequency2(self, value: int) -> None: 1563 """Configures the 48-bit NCO frequency word 2 of DDC1. 1564 1565 Arguments: 1566 value: 1567 Value to write to the NCO frequency word, such that:\n 1568 When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS\n 1569 When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS 1570 1571 Raises: 1572 None 1573 1574 Returns: 1575 None 1576 """ 1577 self.samrat.SET_DDC1_NCO_FREQ2(value)
Configures the 48-bit NCO frequency word 2 of DDC1.
Arguments:
value: Value to write to the NCO frequency word, such that:
When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS
When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS
Raises:
- None
Returns:
None
1579 def ddc1_nco_frequency3(self, value: int) -> None: 1580 """Configures the 48-bit NCO frequency word 3 of DDC1. 1581 1582 Arguments: 1583 value: 1584 Value to write to the NCO frequency word, such that:\n 1585 When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS\n 1586 When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS 1587 1588 Raises: 1589 None 1590 1591 Returns: 1592 None 1593 """ 1594 self.samrat.SET_DDC1_NCO_FREQ3(value)
Configures the 48-bit NCO frequency word 3 of DDC1.
Arguments:
value: Value to write to the NCO frequency word, such that:
When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS
When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS
Raises:
- None
Returns:
None
1596 def ddc2_nco_frequency0(self, value: int) -> None: 1597 """Configures the 48-bit NCO frequency word 0 of DDC2. 1598 1599 Arguments: 1600 value: 1601 Value to write to the NCO frequency word, such that:\n 1602 When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS\n 1603 When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS 1604 1605 Raises: 1606 None 1607 1608 Returns: 1609 None 1610 """ 1611 self.samrat.SET_DDC2_NCO_FREQ0(value)
Configures the 48-bit NCO frequency word 0 of DDC2.
Arguments:
value: Value to write to the NCO frequency word, such that:
When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS
When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS
Raises:
- None
Returns:
None
1613 def ddc2_nco_frequency1(self, value: int) -> None: 1614 """Configures the 48-bit NCO frequency word 1 of DDC2. 1615 1616 Arguments: 1617 value: 1618 Value to write to the NCO frequency word, such that:\n 1619 When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS\n 1620 When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS 1621 1622 Raises: 1623 None 1624 1625 Returns: 1626 None 1627 """ 1628 self.samrat.SET_DDC2_NCO_FREQ1(value)
Configures the 48-bit NCO frequency word 1 of DDC2.
Arguments:
value: Value to write to the NCO frequency word, such that:
When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS
When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS
Raises:
- None
Returns:
None
1630 def ddc2_nco_frequency2(self, value: int) -> None: 1631 """Configures the 48-bit NCO frequency word 2 of DDC2. 1632 1633 Arguments: 1634 value: 1635 Value to write to the NCO frequency word, such that:\n 1636 When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS\n 1637 When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS 1638 1639 Raises: 1640 None 1641 1642 Returns: 1643 None 1644 """ 1645 self.samrat.SET_DDC2_NCO_FREQ2(value)
Configures the 48-bit NCO frequency word 2 of DDC2.
Arguments:
value: Value to write to the NCO frequency word, such that:
When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS
When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS
Raises:
- None
Returns:
None
1647 def ddc2_nco_frequency3(self, value: int) -> None: 1648 """Configures the 48-bit NCO frequency word 3 of DDC2. 1649 1650 Arguments: 1651 value: 1652 Value to write to the NCO frequency word, such that:\n 1653 When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS\n 1654 When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS 1655 1656 Raises: 1657 None 1658 1659 Returns: 1660 None 1661 """ 1662 self.samrat.SET_DDC2_NCO_FREQ3(value)
Configures the 48-bit NCO frequency word 3 of DDC2.
Arguments:
value: Value to write to the NCO frequency word, such that:
When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS
When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS
Raises:
- None
Returns:
None
1664 def ddc3_nco_frequency0(self, value: int) -> None: 1665 """Configures the 48-bit NCO frequency word 0 of DDC3. 1666 1667 Arguments: 1668 value: 1669 Value to write to the NCO frequency word, such that:\n 1670 When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS\n 1671 When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS 1672 1673 Raises: 1674 None 1675 1676 Returns: 1677 None 1678 """ 1679 self.samrat.SET_DDC3_NCO_FREQ0(value)
Configures the 48-bit NCO frequency word 0 of DDC3.
Arguments:
value: Value to write to the NCO frequency word, such that:
When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS
When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS
Raises:
- None
Returns:
None
1681 def ddc3_nco_frequency1(self, value: int) -> None: 1682 """Configures the 48-bit NCO frequency word 1 of DDC3. 1683 1684 Arguments: 1685 value: 1686 Value to write to the NCO frequency word, such that:\n 1687 When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS\n 1688 When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS 1689 1690 Raises: 1691 None 1692 1693 Returns: 1694 None 1695 """ 1696 self.samrat.SET_DDC3_NCO_FREQ1(value)
Configures the 48-bit NCO frequency word 1 of DDC3.
Arguments:
value: Value to write to the NCO frequency word, such that:
When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS
When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS
Raises:
- None
Returns:
None
1698 def ddc3_nco_frequency2(self, value: int) -> None: 1699 """Configures the 48-bit NCO frequency word 2 of DDC3. 1700 1701 Arguments: 1702 value: 1703 Value to write to the NCO frequency word, such that:\n 1704 When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS\n 1705 When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS 1706 1707 Raises: 1708 None 1709 1710 Returns: 1711 None 1712 """ 1713 self.samrat.SET_DDC3_NCO_FREQ2(value)
Configures the 48-bit NCO frequency word 2 of DDC3.
Arguments:
value: Value to write to the NCO frequency word, such that:
When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS
When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS
Raises:
- None
Returns:
None
1715 def ddc3_nco_frequency3(self, value: int) -> None: 1716 """Configures the 48-bit NCO frequency word 3 of DDC3. 1717 1718 Arguments: 1719 value: 1720 Value to write to the NCO frequency word, such that:\n 1721 When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS\n 1722 When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS 1723 1724 Raises: 1725 None 1726 1727 Returns: 1728 None 1729 """ 1730 self.samrat.SET_DDC3_NCO_FREQ3(value)
Configures the 48-bit NCO frequency word 3 of DDC3.
Arguments:
value: Value to write to the NCO frequency word, such that:
When 0 > NCO frequency ≥ FS/2: value = fNCO * 2^48 / FS
When -FS/2 ≤ NCO frequency < 0: value = (fNCO + FS) * 2^48 / FS
Raises:
- None
Returns:
None
1732 def ddc0_nco_phase0(self, value: int) -> None: 1733 """Configures the starting phase for NCO Frequency 0 of DDC0 1734 1735 Arguments: 1736 value: 1737 Value to write to the NCO phase word, such that: 1738 value = 90° / Phase 1739 Raises: 1740 None 1741 1742 Returns: 1743 None 1744 """ 1745 self.samrat.SET_DDC0_NCO_PHASE0(value)
Configures the starting phase for NCO Frequency 0 of DDC0
Arguments:
- value: Value to write to the NCO phase word, such that: value = 90° / Phase
Raises:
- None
Returns:
None
1747 def ddc0_nco_phase1(self, value: int) -> None: 1748 """Configures the starting phase for NCO Frequency 1 of DDC0 1749 1750 Arguments: 1751 value: 1752 Value to write to the NCO phase word, such that: 1753 value = 90° / Phase 1754 Raises: 1755 None 1756 1757 Returns: 1758 None 1759 """ 1760 self.samrat.SET_DDC0_NCO_PHASE1(value)
Configures the starting phase for NCO Frequency 1 of DDC0
Arguments:
- value: Value to write to the NCO phase word, such that: value = 90° / Phase
Raises:
- None
Returns:
None
1762 def ddc0_nco_phase2(self, value: int) -> None: 1763 """Configures the starting phase for NCO Frequency 2 of DDC0 1764 1765 Arguments: 1766 value: 1767 Value to write to the NCO phase word, such that: 1768 value = 90° / Phase 1769 Raises: 1770 None 1771 1772 Returns: 1773 None 1774 """ 1775 self.samrat.SET_DDC0_NCO_PHASE2(value)
Configures the starting phase for NCO Frequency 2 of DDC0
Arguments:
- value: Value to write to the NCO phase word, such that: value = 90° / Phase
Raises:
- None
Returns:
None
1777 def ddc0_nco_phase3(self, value: int) -> None: 1778 """Configures the starting phase for NCO Frequency 3 of DDC0 1779 1780 Arguments: 1781 value: 1782 Value to write to the NCO phase word, such that: 1783 value = 90° / Phase 1784 Raises: 1785 None 1786 1787 Returns: 1788 None 1789 """ 1790 self.samrat.SET_DDC0_NCO_PHASE3(value)
Configures the starting phase for NCO Frequency 3 of DDC0
Arguments:
- value: Value to write to the NCO phase word, such that: value = 90° / Phase
Raises:
- None
Returns:
None
1792 def ddc1_nco_phase0(self, value: int) -> None: 1793 """Configures the starting phase for NCO Frequency 0 of DDC1 1794 1795 Arguments: 1796 value: 1797 Value to write to the NCO phase word, such that: 1798 value = 90° / Phase 1799 Raises: 1800 None 1801 1802 Returns: 1803 None 1804 """ 1805 self.samrat.SET_DDC1_NCO_PHASE0(value)
Configures the starting phase for NCO Frequency 0 of DDC1
Arguments:
- value: Value to write to the NCO phase word, such that: value = 90° / Phase
Raises:
- None
Returns:
None
1807 def ddc1_nco_phase1(self, value: int) -> None: 1808 """Configures the starting phase for NCO Frequency 1 of DDC1 1809 1810 Arguments: 1811 value: 1812 Value to write to the NCO phase word, such that: 1813 value = 90° / Phase 1814 Raises: 1815 None 1816 1817 Returns: 1818 None 1819 """ 1820 self.samrat.SET_DDC1_NCO_PHASE1(value)
Configures the starting phase for NCO Frequency 1 of DDC1
Arguments:
- value: Value to write to the NCO phase word, such that: value = 90° / Phase
Raises:
- None
Returns:
None
1822 def ddc1_nco_phase2(self, value: int) -> None: 1823 """Configures the starting phase for NCO Frequency 2 of DDC1 1824 1825 Arguments: 1826 value: 1827 Value to write to the NCO phase word, such that: 1828 value = 90° / Phase 1829 Raises: 1830 None 1831 1832 Returns: 1833 None 1834 """ 1835 self.samrat.SET_DDC1_NCO_PHASE2(value)
Configures the starting phase for NCO Frequency 2 of DDC1
Arguments:
- value: Value to write to the NCO phase word, such that: value = 90° / Phase
Raises:
- None
Returns:
None
1837 def ddc1_nco_phase3(self, value: int) -> None: 1838 """Configures the starting phase for NCO Frequency 3 of DDC1 1839 1840 Arguments: 1841 value: 1842 Value to write to the NCO phase word, such that: 1843 value = 90° / Phase 1844 Raises: 1845 None 1846 1847 Returns: 1848 None 1849 """ 1850 self.samrat.SET_DDC1_NCO_PHASE3(value)
Configures the starting phase for NCO Frequency 3 of DDC1
Arguments:
- value: Value to write to the NCO phase word, such that: value = 90° / Phase
Raises:
- None
Returns:
None
1852 def ddc2_nco_phase0(self, value: int) -> None: 1853 """Configures the starting phase for NCO Frequency 0 of DDC2 1854 1855 Arguments: 1856 value: 1857 Value to write to the NCO phase word, such that: 1858 value = 90° / Phase 1859 Raises: 1860 None 1861 1862 Returns: 1863 None 1864 """ 1865 self.samrat.SET_DDC2_NCO_PHASE0(value)
Configures the starting phase for NCO Frequency 0 of DDC2
Arguments:
- value: Value to write to the NCO phase word, such that: value = 90° / Phase
Raises:
- None
Returns:
None
1867 def ddc2_nco_phase1(self, value: int) -> None: 1868 """Configures the starting phase for NCO Frequency 1 of DDC2 1869 1870 Arguments: 1871 value: 1872 Value to write to the NCO phase word, such that: 1873 value = 90° / Phase 1874 Raises: 1875 None 1876 1877 Returns: 1878 None 1879 """ 1880 self.samrat.SET_DDC2_NCO_PHASE1(value)
Configures the starting phase for NCO Frequency 1 of DDC2
Arguments:
- value: Value to write to the NCO phase word, such that: value = 90° / Phase
Raises:
- None
Returns:
None
1882 def ddc2_nco_phase2(self, value: int) -> None: 1883 """Configures the starting phase for NCO Frequency 2 of DDC2 1884 1885 Arguments: 1886 value: 1887 Value to write to the NCO phase word, such that: 1888 value = 90° / Phase 1889 Raises: 1890 None 1891 1892 Returns: 1893 None 1894 """ 1895 self.samrat.SET_DDC2_NCO_PHASE2(value)
Configures the starting phase for NCO Frequency 2 of DDC2
Arguments:
- value: Value to write to the NCO phase word, such that: value = 90° / Phase
Raises:
- None
Returns:
None
1897 def ddc2_nco_phase3(self, value: int) -> None: 1898 """Configures the starting phase for NCO Frequency 3 of DDC2 1899 1900 Arguments: 1901 value: 1902 Value to write to the NCO phase word, such that: 1903 value = 90° / Phase 1904 Raises: 1905 None 1906 1907 Returns: 1908 None 1909 """ 1910 self.samrat.SET_DDC2_NCO_PHASE3(value)
Configures the starting phase for NCO Frequency 3 of DDC2
Arguments:
- value: Value to write to the NCO phase word, such that: value = 90° / Phase
Raises:
- None
Returns:
None
1912 def ddc3_nco_phase0(self, value: int) -> None: 1913 """Configures the starting phase for NCO Frequency 0 of DDC3 1914 1915 Arguments: 1916 value: 1917 Value to write to the NCO phase word, such that: 1918 value = 90° / Phase 1919 Raises: 1920 None 1921 1922 Returns: 1923 None 1924 """ 1925 self.samrat.SET_DDC3_NCO_PHASE0(value)
Configures the starting phase for NCO Frequency 0 of DDC3
Arguments:
- value: Value to write to the NCO phase word, such that: value = 90° / Phase
Raises:
- None
Returns:
None
1927 def ddc3_nco_phase1(self, value: int) -> None: 1928 """Configures the starting phase for NCO Frequency 1 of DDC3 1929 1930 Arguments: 1931 value: 1932 Value to write to the NCO phase word, such that: 1933 value = 90° / Phase 1934 Raises: 1935 None 1936 1937 Returns: 1938 None 1939 """ 1940 self.samrat.SET_DDC3_NCO_PHASE1(value)
Configures the starting phase for NCO Frequency 1 of DDC3
Arguments:
- value: Value to write to the NCO phase word, such that: value = 90° / Phase
Raises:
- None
Returns:
None
1942 def ddc3_nco_phase2(self, value: int) -> None: 1943 """Configures the starting phase for NCO Frequency 2 of DDC3 1944 1945 Arguments: 1946 value: 1947 Value to write to the NCO phase word, such that: 1948 value = 90° / Phase 1949 Raises: 1950 None 1951 1952 Returns: 1953 None 1954 """ 1955 self.samrat.SET_DDC3_NCO_PHASE2(value)
Configures the starting phase for NCO Frequency 2 of DDC3
Arguments:
- value: Value to write to the NCO phase word, such that: value = 90° / Phase
Raises:
- None
Returns:
None
1957 def ddc3_nco_phase3(self, value: int) -> None: 1958 """Configures the starting phase for NCO Frequency 3 of DDC3 1959 1960 Arguments: 1961 value: 1962 Value to write to the NCO phase word, such that: 1963 value = 90° / Phase 1964 Raises: 1965 None 1966 1967 Returns: 1968 None 1969 """ 1970 self.samrat.SET_DDC3_NCO_PHASE3(value)
Configures the starting phase for NCO Frequency 3 of DDC3
Arguments:
- value: Value to write to the NCO phase word, such that: value = 90° / Phase
Raises:
- None
Returns:
None
1972 def enable_dclk_divider(self, value: int) -> None: 1973 """Enables the Data Clock divider for higher decimation rates. 1974 1975 Arguments: 1976 value: input value 1977 - 0: DCLK divider is disabled. DCLK is equal to the Sample CLK 1978 - 1: DCLK divider is enabled. DCLK is divided down from Sample CLK 1979 1980 Raises: 1981 None 1982 1983 Returns: 1984 None 1985 """ 1986 self.samrat.SET_DIG_CLK_DDC(value)
Enables the Data Clock divider for higher decimation rates.
Arguments:
- value: input value
- 0: DCLK divider is disabled. DCLK is equal to the Sample CLK
- 1: DCLK divider is enabled. DCLK is divided down from Sample CLK
Raises:
- None
Returns:
None
1988 def dclk_powerdown(self, value: int) -> None: 1989 """Powers down the LVDS output clock. 1990 1991 Arguments: 1992 value: input value 1993 - 0: Normal operation 1994 - 1: Dclk powered down 1995 1996 Raises: 1997 None 1998 1999 Returns: 2000 None 2001 """ 2002 self.samrat.SET_DCLK_PDN(value)
Powers down the LVDS output clock.
Arguments:
- value: input value
- 0: Normal operation
- 1: Dclk powered down
Raises:
- None
Returns:
None
2013 def pulse_overrange_clear(self) -> None: 2014 """Clears the Digital Overrange by pulsing a value of 2 on the OVR_CLR register field 2015 2016 Arguments: 2017 None 2018 2019 Raises: 2020 None 2021 2022 Returns: 2023 None 2024 """ 2025 self.samrat.SET_DIG_OVR_CLEAR(0x0) 2026 sleep(0.1) 2027 self.samrat.SET_DIG_OVR_CLEAR(0x2) 2028 sleep(0.1) 2029 self.samrat.SET_DIG_OVR_CLEAR(0x0)
Clears the Digital Overrange by pulsing a value of 2 on the OVR_CLR register field
Arguments:
- None
Raises:
- None
Returns:
None
2031 def invert_lvds_lanes(self, lanes: List[int]) -> None: 2032 """Inverts the polarity of individual LVDS output lanes. 2033 2034 Arguments: 2035 lanes: 2036 List of 16 lanes with the corresponding values: 2037 - 0: Polarity as shown in pin diagram. 2038 - 1: Polarity inverted 2039 2040 Raises: 2041 None 2042 2043 Returns: 2044 None 2045 """ 2046 lanes = int("".join(map(str, lanes)), 2) 2047 self.samrat.SET_LVDS_DATA_INV(lanes)
Inverts the polarity of individual LVDS output lanes.
Arguments:
- lanes: List of 16 lanes with the corresponding values:
- 0: Polarity as shown in pin diagram.
- 1: Polarity inverted
Raises:
- None
Returns:
None
2049 def powerdown_lvds_lanes(self, lanes: List[int]) -> None: 2050 """Powers down the individual LVDS output lanes and puts LVDS pins into high impedance state. 2051 2052 Arguments: 2053 lanes: 2054 List of bits which enable or disable the LVDS lanes as follows 2055 - 0: Normal operation 2056 - 1: Powered down 2057 2058 Raises: 2059 None 2060 2061 Returns: 2062 None 2063 """ 2064 lanes = int("".join(map(str, lanes)), 2) 2065 self.samrat.SET_LVDS_DATA_PDN(lanes)
Powers down the individual LVDS output lanes and puts LVDS pins into high impedance state.
Arguments:
- lanes: List of bits which enable or disable the LVDS lanes as follows
- 0: Normal operation
- 1: Powered down
Raises:
- None
Returns:
None
2067 def dout_mux(self, lane: int, data: int) -> None: 2068 """Configures the data bus assignments for each individual output lane 2069 2070 Arguments: 2071 lane: 2072 The DOUT output pin to be mapped to 2073 data: 2074 The internal digital data bus lane that is being mapped 2075 2076 Raises: 2077 None 2078 2079 Returns: 2080 None 2081 """ 2082 if lane == 0: 2083 self.samrat.SET_LANE0_MUX_SEL(data) 2084 elif lane == 1: 2085 self.samrat.SET_LANE1_MUX_SEL(data) 2086 elif lane == 2: 2087 self.samrat.SET_LANE2_MUX_SEL(data) 2088 elif lane == 3: 2089 self.samrat.SET_LANE3_MUX_SEL(data) 2090 elif lane == 4: 2091 self.samrat.SET_LANE4_MUX_SEL(data) 2092 elif lane == 5: 2093 self.samrat.SET_LANE5_MUX_SEL(data) 2094 elif lane == 6: 2095 self.samrat.SET_LANE6_MUX_SEL(data) 2096 elif lane == 7: 2097 self.samrat.SET_LANE7_MUX_SEL(data) 2098 elif lane == 8: 2099 self.samrat.SET_LANE8_MUX_SEL(data) 2100 elif lane == 9: 2101 self.samrat.SET_LANE9_MUX_SEL(data) 2102 elif lane == 10: 2103 self.samrat.SET_LANE10_MUX_SEL(data) 2104 elif lane == 11: 2105 self.samrat.SET_LANE11_MUX_SEL(data) 2106 elif lane == 12: 2107 self.samrat.SET_LANE12_MUX_SEL(data) 2108 elif lane == 13: 2109 self.samrat.SET_LANE13_MUX_SEL(data) 2110 elif lane == 14: 2111 self.samrat.SET_LANE14_MUX_SEL(data) 2112 elif lane == 15: 2113 self.samrat.SET_LANE15_MUX_SEL(data)
Configures the data bus assignments for each individual output lane
Arguments:
- lane: The DOUT output pin to be mapped to
- data: The internal digital data bus lane that is being mapped
Raises:
- None
Returns:
None
2115 def lvds_mirror_all(self, lane: int) -> None: 2116 """Mirrors all LVDS lanes to data of chosen lane 2117 2118 Arguments: 2119 lane: 2120 The desired lane data to mirror to all output lanes 2121 2122 Raises: 2123 None 2124 2125 Returns: 2126 None 2127 """ 2128 for i in range(0, 16): 2129 self.dout_mux(i, lane)
Mirrors all LVDS lanes to data of chosen lane
Arguments:
- lane: The desired lane data to mirror to all output lanes
Raises:
- None
Returns:
None
2131 def cha_digital_gain(self, value: int) -> None: 2132 """Controls digital gain for channel A. Maximum gain is 6dB. 2133 2134 Arguments: 2135 value: 2136 Desired gain value in dB 2137 2138 Raises: 2139 None 2140 2141 Returns: 2142 None 2143 """ 2144 gain = 20 * log(1 + (value / 128), 10) 2145 self.samrat.SET_CH0_PROG_GAIN(gain)
Controls digital gain for channel A. Maximum gain is 6dB.
Arguments:
- value: Desired gain value in dB
Raises:
- None
Returns:
None
2147 def chb_digital_gain(self, value: int) -> None: 2148 """Controls digital gain for channel B. Maximum gain is 6dB. 2149 2150 Arguments: 2151 value: 2152 Desired gain value in dB 2153 2154 Raises: 2155 None 2156 2157 Returns: 2158 None 2159 """ 2160 gain = 20 * log(1 + (value / 128), 10) 2161 self.samrat.SET_CH1_PROG_GAIN(gain)
Controls digital gain for channel B. Maximum gain is 6dB.
Arguments:
- value: Desired gain value in dB
Raises:
- None
Returns:
None
2163 def sysref_pulse(self) -> None: 2164 """Pulses the sysref signal 2165 2166 Arguments: 2167 None 2168 2169 Raises: 2170 None 2171 2172 Returns: 2173 None 2174 """ 2175 self.sysref_mode(0) 2176 sleep(0.1) 2177 self.sysref_mode(3) 2178 sleep(0.1) 2179 self.sysref_mode(0)
Pulses the sysref signal
Arguments:
- None
Raises:
- None
Returns:
None
2181 def ddc_input_source(self, ddc: int, input: int) -> None: 2182 """Sets the input data source to each of the decimation filters. 2183 2184 Arguments: 2185 ddc: 2186 The DDC for which the input data source is being configured 2187 input: 2188 Input to the DDC 2189 - 0: Channel A 2190 - 1: Channel B 2191 - 2: 2x Average ((ChA + ChB)/2) 2192 - 3: 2x Average ((ChA - ChB)/2) 2193 2194 Raises: 2195 None 2196 2197 Returns: 2198 None 2199 """ 2200 if ddc == 0: 2201 self.samrat.SET_DDC0_MUX(input) 2202 elif ddc == 1: 2203 if input == 0: 2204 input = 1 2205 elif input == 1: 2206 input = 0 2207 self.samrat.SET_DDC1_MUX(input) 2208 elif ddc == 2: 2209 self.samrat.SET_DDC2_MUX(input) 2210 elif ddc == 3: 2211 if input == 0: 2212 input = 1 2213 elif input == 1: 2214 input = 0 2215 self.samrat.SET_DDC3_MUX(input)
Sets the input data source to each of the decimation filters.
Arguments:
- ddc: The DDC for which the input data source is being configured
- input: Input to the DDC
- 0: Channel A
- 1: Channel B
- 2: 2x Average ((ChA + ChB)/2)
- 3: 2x Average ((ChA - ChB)/2)
Raises:
- None
Returns:
None
2217 def nco_update(self, nco: int) -> None: 2218 """Updates the frequency of the selected NCO by pulsing a value of 1 on the corresponding NCO_UPDATE field 2219 2220 Arguments: 2221 nco: 2222 NCO that is being configured 2223 2224 Raises: 2225 None 2226 2227 Returns: 2228 None 2229 """ 2230 if nco == 0: 2231 self.samrat.SET_NCO0_UPDATE(0) 2232 sleep(0.1) 2233 self.samrat.SET_NCO0_UPDATE(1) 2234 sleep(0.1) 2235 self.samrat.SET_NCO0_UPDATE(1) 2236 elif nco == 1: 2237 self.samrat.SET_NCO1_UPDATE(0) 2238 sleep(0.1) 2239 self.samrat.SET_NCO1_UPDATE(1) 2240 sleep(0.1) 2241 self.samrat.SET_NCO1_UPDATE(1) 2242 elif nco == 2: 2243 self.samrat.SET_NCO2_UPDATE(0) 2244 sleep(0.1) 2245 self.samrat.SET_NCO2_UPDATE(1) 2246 sleep(0.1) 2247 self.samrat.SET_NCO2_UPDATE(1) 2248 elif nco == 3: 2249 self.samrat.SET_NCO3_UPDATE(0) 2250 sleep(0.1) 2251 self.samrat.SET_NCO3_UPDATE(1) 2252 sleep(0.1) 2253 self.samrat.SET_NCO3_UPDATE(1)
Updates the frequency of the selected NCO by pulsing a value of 1 on the corresponding NCO_UPDATE field
Arguments:
- nco: NCO that is being configured
Raises:
- None
Returns:
None
2255 def nco_update_common(self) -> None: 2256 """Updates the four NCO frequencies of all NCOs by pulsing a vlaue of 1 on the NCO_COMMON_UPDATE field 2257 2258 Arguments: 2259 None 2260 2261 Raises: 2262 None 2263 2264 Returns: 2265 None 2266 """ 2267 self.samrat.SET_NCO_COMMON_UPDATE(0) 2268 sleep(0.1) 2269 self.samrat.SET_NCO_COMMON_UPDATE(1) 2270 sleep(0.1) 2271 self.samrat.SET_NCO_COMMON_UPDATE(0)
Updates the four NCO frequencies of all NCOs by pulsing a vlaue of 1 on the NCO_COMMON_UPDATE field
Arguments:
- None
Raises:
- None
Returns:
None
2273 def ddc_nco_select(self, ddc: int, nco: int) -> None: 2274 """These bits select which of the 4 frequencies are active in the respective DDCs/NCOs. 2275 2276 Arguments: 2277 ddc: 2278 DDC of which to configure the nco frequency 2279 nco: 2280 NCO frequency to set as the active frequency 2281 2282 Raises: 2283 None 2284 2285 Returns: 2286 None 2287 """ 2288 if ddc == 0: 2289 self.samrat.SET_DDC0_NCO_SEL(nco) 2290 elif ddc == 1: 2291 self.samrat.SET_DDC1_NCO_SEL(nco) 2292 elif ddc == 2: 2293 self.samrat.SET_DDC2_NCO_SEL(nco) 2294 elif ddc == 3: 2295 self.samrat.SET_DDC3_NCO_SEL(nco)
These bits select which of the 4 frequencies are active in the respective DDCs/NCOs.
Arguments:
- ddc: DDC of which to configure the nco frequency
- nco: NCO frequency to set as the active frequency
Raises:
- None
Returns:
None
2297 def ddc_decimation_factor(self, ddc: int, factor: int) -> None: 2298 """Sets the decimation factor for each DDC 2299 2300 Arguments: 2301 ddc: 2302 The DDC for which the decimation factor is being configured 2303 factor: 2304 Desired decimation factor 2305 2306 Raises: 2307 None 2308 2309 Returns: 2310 None 2311 """ 2312 if factor == 0: 2313 n = factor 2314 else: 2315 n = int(log(factor, 2)) 2316 2317 self.samrat.SET_SELECT_INDEPENDENT_DECIMATION( 2318 1 2319 ) # Configure for different decimation factors for each DDC 2320 2321 if ddc == 0: 2322 self.samrat.SET_DDC0_DECIMATION_MODE(n) 2323 elif ddc == 1: 2324 self.samrat.SET_DDC1_DECIMATION_MODE(n) 2325 elif ddc == 2: 2326 self.samrat.SET_DDC2_DECIMATION_MODE(n) 2327 elif ddc == 3: 2328 self.samrat.SET_DDC3_DECIMATION_MODE(n)
Sets the decimation factor for each DDC
Arguments:
- ddc: The DDC for which the decimation factor is being configured
- factor: Desired decimation factor
Raises:
- None
Returns:
None
2330 def decimation_factor_common(self, factor: int) -> None: 2331 """Enables decimation for all DDCs and sets the common decimation factor for all DDCs 2332 2333 Arguments: 2334 factor: 2335 Desired decimation factor 2336 2337 Raises: 2338 None 2339 2340 Returns: 2341 None 2342 """ 2343 if factor == 0: 2344 n = factor 2345 else: 2346 n = int(log(factor, 2)) 2347 2348 self.samrat.SET_SELECT_INDEPENDENT_DECIMATION( 2349 0 2350 ) # Configure for common decimation factors for all DDCs 2351 self.samrat.SET_COMMON_DECIMATION_MODE(n)
Enables decimation for all DDCs and sets the common decimation factor for all DDCs
Arguments:
- factor: Desired decimation factor
Raises:
- None
Returns:
None
2353 def ddc_nco_frequency(self, ddc: int, nco: int, freq: int) -> None: 2354 """Configures the 48-bit frequency words for the four DDCs/NCOs. 2355 2356 Arguments: 2357 ddc: 2358 DDC of which the frequency is being configured 2359 nco: 2360 NCO frequency which is being configured (0-3) 2361 freq: 2362 Desired frequency 2363 2364 Raises: 2365 None 2366 2367 Returns: 2368 None 2369 """ 2370 if freq > 0: 2371 nco_word = int( 2372 freq * (2**48) / self.fs 2373 ) # Formula for calulating this value is in the datasheet 2374 else: 2375 nco_word = int( 2376 ((self.samrat.fs + freq) * (2**48) / self.fs) - 1 2377 ) # Formula for calulating this value is in the datasheet 2378 2379 if ddc == 0: 2380 if nco == 0: 2381 self.samrat.SET_DDC0_NCO_FREQ0(nco_word) 2382 elif nco == 1: 2383 self.samrat.SET_DDC0_NCO_FREQ1(nco_word) 2384 elif nco == 2: 2385 self.samrat.SET_DDC0_NCO_FREQ2(nco_word) 2386 elif nco == 3: 2387 self.samrat.SET_DDC0_NCO_FREQ3(nco_word) 2388 elif ddc == 1: 2389 if nco == 0: 2390 self.samrat.SET_DDC1_NCO_FREQ0(nco_word) 2391 elif nco == 1: 2392 self.samrat.SET_DDC1_NCO_FREQ1(nco_word) 2393 elif nco == 2: 2394 self.samrat.SET_DDC1_NCO_FREQ2(nco_word) 2395 elif nco == 3: 2396 self.samrat.SET_DDC1_NCO_FREQ3(nco_word) 2397 elif ddc == 2: 2398 if nco == 0: 2399 self.samrat.SET_DDC2_NCO_FREQ0(nco_word) 2400 elif nco == 1: 2401 self.samrat.SET_DDC2_NCO_FREQ1(nco_word) 2402 elif nco == 2: 2403 self.samrat.SET_DDC2_NCO_FREQ2(nco_word) 2404 elif nco == 3: 2405 self.samrat.SET_DDC2_NCO_FREQ3(nco_word) 2406 elif ddc == 3: 2407 if nco == 0: 2408 self.samrat.SET_DDC3_NCO_FREQ0(nco_word) 2409 elif nco == 1: 2410 self.samrat.SET_DDC3_NCO_FREQ1(nco_word) 2411 elif nco == 2: 2412 self.samrat.SET_DDC3_NCO_FREQ2(nco_word) 2413 elif nco == 3: 2414 self.samrat.SET_DDC3_NCO_FREQ3(nco_word)
Configures the 48-bit frequency words for the four DDCs/NCOs.
Arguments:
- ddc: DDC of which the frequency is being configured
- nco: NCO frequency which is being configured (0-3)
- freq: Desired frequency
Raises:
- None
Returns:
None
2416 def ddc_nco_phase(self, ddc: int, nco: int, phase: int) -> None: 2417 """Configure the starting phase of the frequency for the DDCs/NCOs. The phase value is: 90° / <16-bit register> 2418 2419 Arguments: 2420 ddc: 2421 DDC of which the phase is being configured 2422 nco: 2423 NCO of which the phase is being configured 2424 phase: 2425 desired phase in degrees 2426 2427 Raises: 2428 None 2429 2430 Returns: 2431 None 2432 """ 2433 if phase == 0: 2434 phaseval = 0 2435 else: 2436 phaseval = int(90 / phase) 2437 2438 if ddc == 0: 2439 if nco == 0: 2440 self.samrat.SET_DDC0_NCO_PHASE0(phaseval) 2441 elif nco == 1: 2442 self.samrat.SET_DDC0_NCO_PHASE1(phaseval) 2443 elif nco == 2: 2444 self.samrat.SET_DDC0_NCO_PHASE2(phaseval) 2445 elif nco == 3: 2446 self.samrat.SET_DDC0_NCO_PHASE3(phaseval) 2447 elif ddc == 1: 2448 if nco == 0: 2449 self.samrat.SET_DDC0_NCO_PHASE0(phaseval) 2450 elif nco == 1: 2451 self.samrat.SET_DDC1_NCO_PHASE1(phaseval) 2452 elif nco == 2: 2453 self.samrat.SET_DDC2_NCO_PHASE2(phaseval) 2454 elif nco == 3: 2455 self.samrat.SET_DDC3_NCO_PHASE3(phaseval) 2456 elif ddc == 2: 2457 if nco == 0: 2458 self.samrat.SET_DDC0_NCO_PHASE0(phaseval) 2459 elif nco == 1: 2460 self.samrat.SET_DDC1_NCO_PHASE1(phaseval) 2461 elif nco == 2: 2462 self.samrat.SET_DDC2_NCO_PHASE2(phaseval) 2463 elif nco == 3: 2464 self.samrat.SET_DDC3_NCO_PHASE3(phaseval) 2465 elif ddc == 3: 2466 if nco == 0: 2467 self.samrat.SET_DDC0_NCO_PHASE0(phaseval) 2468 elif nco == 1: 2469 self.samrat.SET_DDC1_NCO_PHASE1(phaseval) 2470 elif nco == 2: 2471 self.samrat.SET_DDC2_NCO_PHASE2(phaseval) 2472 elif nco == 3: 2473 self.samrat.SET_DDC3_NCO_PHASE3(phaseval)
Configure the starting phase of the frequency for the DDCs/NCOs. The phase value is: 90° / <16-bit register>
Arguments:
- ddc: DDC of which the phase is being configured
- nco: NCO of which the phase is being configured
- phase: desired phase in degrees
Raises:
- None
Returns:
None
2475 def read_all_regs(self) -> None: 2476 """Reads all registers for configuration debug purposes. 2477 2478 Arguments: 2479 None 2480 2481 Raises: 2482 None 2483 2484 Returns: 2485 None 2486 """ 2487 self.samrat.debugReadback()
Reads all registers for configuration debug purposes.
Arguments:
- None
Raises:
- None
Returns:
None